summaryrefslogtreecommitdiff
path: root/tests/scripts/vms/library
diff options
context:
space:
mode:
authorJohn Malmberg <wb8tyw@qsl.net>2014-09-11 22:39:34 -0500
committerPaul Smith <psmith@gnu.org>2014-10-20 01:31:42 -0400
commit18eb093f569812e832a0fedcf867c85be1ae45c6 (patch)
treeff9b2ec2174b54227f27d5be89648811a74a7ec2 /tests/scripts/vms/library
parent894ee7f6c8b96ed89d4672da6cde4105c15cbf31 (diff)
downloadgunmake-18eb093f569812e832a0fedcf867c85be1ae45c6.tar.gz
[SV 41758]: Fix archive support for VMS.
Upated to match change to run_make_tests and some future fixes to make on VMS. * arscan.c: Use ANSI compatible pragmas instead of VAX C extensions. * tests/scripts/features/archives: Fix tests to use VMS rules and answers when running on VMS and using DCL as a shell. * tests/scripts/features/vpath3: Fix epected answer on test when run on VMS. * tests/scripts/vms/library: (New) Test the VMS library rules that are not tested by existing tests.
Diffstat (limited to 'tests/scripts/vms/library')
-rw-r--r--tests/scripts/vms/library73
1 files changed, 73 insertions, 0 deletions
diff --git a/tests/scripts/vms/library b/tests/scripts/vms/library
new file mode 100644
index 0000000..9a64951
--- /dev/null
+++ b/tests/scripts/vms/library
@@ -0,0 +1,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;