| 1 |
# -*-mode: perl-*- |
| 2 |
|
| 3 |
$description = "Test GNU Make's VMS Library management features."; |
| 4 |
|
| 5 |
$details = "\ |
| 6 |
This only works on VMS systems."; |
| 7 |
|
| 8 |
return -1 if $osname ne 'VMS'; |
| 9 |
|
| 10 |
# Help library |
| 11 |
$mk_string = "help : help.hlb(file1.hlp)\n\n" . |
| 12 |
"file1.hlp :\n" . |
| 13 |
"\t\@pipe open/write xxx file1.hlp ; write xxx \"1 help\" ; close xxx\n"; |
| 14 |
|
| 15 |
my $answer = "library /replace help.hlb file1.hlp"; |
| 16 |
|
| 17 |
run_make_test($mk_string, |
| 18 |
'', $answer); |
| 19 |
|
| 20 |
unlink('help.hlb'); |
| 21 |
unlink('file1.hlp'); |
| 22 |
|
| 23 |
#Text library |
| 24 |
$mk_string = "text : text.tlb(file1.txt)\n\n" . |
| 25 |
"file1.txt :\n" . |
| 26 |
"\t\@pipe open/write xxx file1.txt ; write xxx \"text file\" ; close xxx\n"; |
| 27 |
|
| 28 |
$answer = "library /replace text.tlb file1.txt"; |
| 29 |
|
| 30 |
run_make_test($mk_string, |
| 31 |
'', $answer); |
| 32 |
|
| 33 |
unlink('text.tlb'); |
| 34 |
unlink('file1.txt'); |
| 35 |
|
| 36 |
|
| 37 |
#Macro library |
| 38 |
$mk_string = "macro : macro.mlb(file1.mar)\n\n" . |
| 39 |
"file1.mar :\n" . |
| 40 |
"\tpipe open/write xxx file1.mar ; " . |
| 41 |
"write xxx \".macro a b\" ; write xxx \".endm\" ; close xxx\n"; |
| 42 |
|
| 43 |
$answer = "library /replace macro.mlb file1.mar"; |
| 44 |
|
| 45 |
run_make_test($mk_string, |
| 46 |
'', $answer); |
| 47 |
|
| 48 |
unlink('macro.mlb'); |
| 49 |
unlink('file1.mar'); |
| 50 |
|
| 51 |
$mk_string = |
| 52 |
"all:imagelib.olb(file2.exe)\n" . |
| 53 |
"file2.exe : file2.obj file2.opt\n" . |
| 54 |
"\t\@link /share=\$\@ \$\*,\$\*/opt\n\n" . |
| 55 |
"file2.opt :\n" . |
| 56 |
"\t\@pipe open/write xxx file2.opt ; " . |
| 57 |
"write xxx \"CASE_SENSITIVE=YES\" ; close xxx\n" . |
| 58 |
"file2.c :\n" . |
| 59 |
"\t\@pipe open/write xxx file2.c ; write xxx \"file2(){}\" ; close xxx\n"; |
| 60 |
|
| 61 |
$answer = "library /replace imagelib.olb file2.exe"; |
| 62 |
|
| 63 |
run_make_test($mk_string, |
| 64 |
'', $answer); |
| 65 |
|
| 66 |
unlink('imagelib.olb'); |
| 67 |
unlink('file2.c'); |
| 68 |
unlink('file2.obj'); |
| 69 |
unlink('file2.exe'); |
| 70 |
unlink('file2.opt'); |
| 71 |
|
| 72 |
# This tells the test driver that the perl test script executed properly. |
| 73 |
1; |