mirror of
https://https.git.savannah.gnu.org/git/make.git
synced 2026-01-29 19:04:18 +00:00
Avoid Emacs local variable settings to disable whitespace cleanup, by creating markup tokens for TAB characters (#TAB#) and space characters (#SPACE#) (for end-of-line spaces). Modify all the tests that use TABs to use the new markup. This requires changing some old-fashioned tests to use the modern run_make_test(). Also remove some of the comments regarding test numbers now that the framework keeps track.
56 lines
1.1 KiB
Perl
56 lines
1.1 KiB
Perl
# -*-Perl-*-
|
|
|
|
$description = "\
|
|
The following test creates a makefile to test the error function.";
|
|
|
|
$details = "";
|
|
|
|
# Test #1
|
|
|
|
run_make_test(q!err = $(error Error found)
|
|
|
|
ifdef ERROR1
|
|
$(error error is $(ERROR1))
|
|
endif
|
|
|
|
ifdef ERROR2
|
|
$(error error is $(ERROR2))
|
|
endif
|
|
|
|
ifdef ERROR3
|
|
all: some; @echo $(error error is $(ERROR3))
|
|
endif
|
|
|
|
ifdef ERROR4
|
|
all: some; @echo error is $(ERROR4)
|
|
#TAB#@echo $(error error is $(ERROR4))
|
|
endif
|
|
|
|
some: ; @echo Some stuff
|
|
|
|
testvar: ; @: $(err)
|
|
!,
|
|
"ERROR1=yes", "#MAKEFILE#:4: *** error is yes. Stop.\n", 512);
|
|
|
|
# Test #2
|
|
|
|
run_make_test(undef, "ERROR2=no", "#MAKEFILE#:8: *** error is no. Stop.\n", 512);
|
|
|
|
# Test #3
|
|
|
|
run_make_test(undef, "ERROR3=maybe",
|
|
"Some stuff\n#MAKEFILE#:12: *** error is maybe. Stop.\n", 512);
|
|
|
|
# Test #4
|
|
|
|
run_make_test(undef, "ERROR4=definitely",
|
|
"Some stuff\n#MAKEFILE#:17: *** error is definitely. Stop.\n", 512);
|
|
|
|
# Test #5
|
|
|
|
run_make_test(undef, "testvar",
|
|
"#MAKEFILE#:22: *** Error found. Stop.\n", 512);
|
|
|
|
# This tells the test driver that the perl test script executed properly.
|
|
1;
|