mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-28 15:57:48 +00:00
414af96a50
Go through both run_make_tests.pl and test_driver.pl and slightly modernize the Perl and clean up indentation etc. Fix a number of warnings in the test scripts detected by running with -w. * tests/test_driver.pl: Move make error string detection out of the base test driver. (run_all_tests): Ensure that we always look for tests in the cwd. * tests/run_make_tests.pl: Use File::Spec for path manipulations. Correctly use setlocale() when detecting error strings. Get configuration from the config-flags.pm file not config.status. * tests/scripts/features/archives: Use new $cwddir variable. * tests/scripts/features/reinvoke: Add missing semicolon. * tests/scripts/features/vpath2: Avoid non-existent variable. * tests/scripts/functions/foreach: Escape variables. * tests/scripts/misc/bs-nl: Remove non-existing \v escape sequence. * tests/scripts/misc/general4: Use handy create_file(). * tests/scripts/options/dash-C: Use Cwd/$cwddir. * tests/scripts/options/dash-I: Use subst_make_string() and #PWD#. * tests/scripts/options/symlinks: Use File::Spec. * tests/scripts/targets/DEFAULT: Use create_file and run_make_test. * tests/scripts/variables/CURDIR: Use run_make_test. * tests/scripts/variables/automatic: Remove extraneous "\". * tests/scripts/vms/library: Remove extra "my" and extraneous "\".
73 lines
1.8 KiB
Perl
73 lines
1.8 KiB
Perl
# -*-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";
|
|
|
|
$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" .
|
|
"\tpipe open/write xxx file1.mar ; " .
|
|
"write xxx \".macro a b\" ; write xxx \".endm\" ; close xxx\n";
|
|
|
|
$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";
|
|
|
|
$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;
|