summaryrefslogtreecommitdiffstats
path: root/src/kmk/tests/scripts/vms/library
blob: 9a64951e9e13a0b34978b0dff7b952de8c6af608 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#                                                              -*-mode: perl-*-

$description = "Test GNU make's VMS Library management features.";

$details = "\
This only works on VMS systems.";

return -1 if $osname ne 'VMS';

# Help library
$mk_string = "help : help.hlb(file1.hlp)\n\n" .
"file1.hlp :\n" .
"\t\@pipe open/write xxx file1.hlp ; write xxx \"1 help\" ; close xxx\n";

my $answer = "library /replace help.hlb file1.hlp";

run_make_test($mk_string,
              '', $answer);

unlink('help.hlb');
unlink('file1.hlp');

#Text library
$mk_string = "text : text.tlb(file1.txt)\n\n" .
"file1.txt :\n" .
"\t\@pipe open/write xxx file1.txt ; write xxx \"text file\" ; close xxx\n";

my $answer = "library /replace text.tlb file1.txt";

run_make_test($mk_string,
              '', $answer);

unlink('text.tlb');
unlink('file1.txt');


#Macro library
$mk_string = "macro : macro.mlb(file1.mar)\n\n" .
"file1.mar :\n" .
"\t\pipe open/write xxx file1.mar ; " .
"write xxx \".macro a b\" ; write xxx \".endm\" ; close xxx\n";

my $answer = "library /replace macro.mlb file1.mar";

run_make_test($mk_string,
              '', $answer);

unlink('macro.mlb');
unlink('file1.mar');

$mk_string =
"all:imagelib.olb(file2.exe)\n" .
"file2.exe : file2.obj file2.opt\n" .
"\t\@link /share=\$\@ \$\*,\$\*/opt\n\n" .
"file2.opt :\n" .
"\t\@pipe open/write xxx file2.opt ; " .
"write xxx \"CASE_SENSITIVE=YES\" ; close xxx\n" .
"file2.c :\n" .
"\t\@pipe open/write xxx file2.c ; write xxx \"file2(){}\" ; close xxx\n";

my $answer = "library /replace imagelib.olb file2.exe";

run_make_test($mk_string,
              '', $answer);

unlink('imagelib.olb');
unlink('file2.c');
unlink('file2.obj');
unlink('file2.exe');
unlink('file2.opt');

# This tells the test driver that the perl test script executed properly.
1;