diff options
author | Paul Smith <psmith@gnu.org> | 1999-11-17 07:33:47 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1999-11-17 07:33:47 +0000 |
commit | ebb733c0f9ab045b6fd6245df2baf2e87463e1bc (patch) | |
tree | bf5d793b4cc99724673804160f2e5e73889da8cc /tests | |
parent | 3e26bde6dbc9a8a46d5a1a694e6810e689cbd25a (diff) | |
download | gunmake-ebb733c0f9ab045b6fd6245df2baf2e87463e1bc.tar.gz |
* Many cleanups and bugfixes.
* New handling of += in target-specific variables.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ChangeLog | 8 | ||||
-rw-r--r-- | tests/scripts/features/targetvars | 26 | ||||
-rw-r--r-- | tests/scripts/functions/if | 6 |
3 files changed, 37 insertions, 3 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 002b93c..f021491 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,11 @@ +1999-11-17 Paul D. Smith <psmith@gnu.org> + + * scripts/functions/if: Add a test for PR/1429: put some text + after an if-statement to make sure it works. + + * scripts/features/targetvars: Add a test for PR/1380: handling += + in target-specific variable definitions correctly. + 1999-10-15 Paul D. Smith <psmith@gnu.org> * scripts/variables/MAKEFILES: This was really broken: it didn't diff --git a/tests/scripts/features/targetvars b/tests/scripts/features/targetvars index 83bf9ed..e4dc0b2 100644 --- a/tests/scripts/features/targetvars +++ b/tests/scripts/features/targetvars @@ -124,5 +124,31 @@ close(MAKEFILE); $answer = "foo bar\n"; &compare_output($answer, &get_logfile(1)); +# TEST #9 +# For PR/1380: Using += assignment in target-specific variables sometimes fails + +$makefile3 = &get_tmpfile; + +open(MAKEFILE,"> $makefile3"); +print MAKEFILE <<'EOF'; +.PHONY: all one +all: FOO += baz +all: one; @echo $(FOO) + +FOO = bar + +one: FOO += biz +one: ; @echo $(FOO) +EOF +close(MAKEFILE); + +&run_make_with_options("$makefile3", "", &get_logfile); +$answer = "bar baz biz\nbar baz\n"; +&compare_output($answer, &get_logfile(1)); + +&run_make_with_options("$makefile3", "one", &get_logfile); +$answer = "bar biz\n"; +&compare_output($answer, &get_logfile(1)); + 1; diff --git a/tests/scripts/functions/if b/tests/scripts/functions/if index cb1f5fc..fa2d0df 100644 --- a/tests/scripts/functions/if +++ b/tests/scripts/functions/if @@ -18,14 +18,14 @@ all: \t\@echo \$(if ,\$(shell echo hi),false) \t\@echo \$(if \$(call NEQ,a,b),true,false) \t\@echo \$(if \$(call NEQ,a,a),true,false) -\t\@echo \$(if z,true,fal,se) -\t\@echo \$(if ,true,fal,se) +\t\@echo \$(if z,true,fal,se) hi +\t\@echo \$(if ,true,fal,se)there EOMAKE close(MAKEFILE); &run_make_with_options($makefile, "", &get_logfile); -$answer = "false\n\n\ntrue\ntrue\nfalse\ntrue\nfalse\ntrue\nfal,se\n"; +$answer = "false\n\n\ntrue\ntrue\nfalse\ntrue\nfalse\ntrue hi\nfal,sethere\n"; &compare_output($answer, &get_logfile(1)); 1; |