diff options
author | Paul Smith <psmith@gnu.org> | 2003-11-04 07:40:29 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2003-11-04 07:40:29 +0000 |
commit | ee3d37a591cf2db3dd1444b2c1e2fcb041f68d33 (patch) | |
tree | 0cedbb4ac47a4a0dcd49bd80c4b0ceadf8bed80d /tests/scripts/functions/eval | |
parent | 76f034acaadf081fd589cc5409bb4c2c138570e0 (diff) | |
download | gunmake-ee3d37a591cf2db3dd1444b2c1e2fcb041f68d33.tar.gz |
Fix bugs 5798 and 6195.
Diffstat (limited to 'tests/scripts/functions/eval')
-rw-r--r-- | tests/scripts/functions/eval | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/scripts/functions/eval b/tests/scripts/functions/eval index cfb27b2..372aaf8 100644 --- a/tests/scripts/functions/eval +++ b/tests/scripts/functions/eval @@ -109,4 +109,29 @@ close(MAKEFILE); $answer = "[ 9 8 7 6 5 4 3 2 1 0 ]\n"; &compare_output($answer,&get_logfile(1)); + +# TEST eval with no filename context. +# The trick here is that because EVAR is taken from the environment, it must +# be evaluated before every command is invoked. Make sure that works, when +# we have no file context for reading_file (bug # 6195) + +$makefile4 = &get_tmpfile; + +open(MAKEFILE,"> $makefile4"); + +print MAKEFILE <<'EOF'; +EVAR = $(eval FOBAR = 1) +all: ; @echo "OK" + +EOF + +close(MAKEFILE); + +$ENV{EVAR} = '1'; +&run_make_with_options($makefile4, "", &get_logfile); +$answer = "OK\n"; +&compare_output($answer,&get_logfile(1)); + +delete $ENV{EVAR}; + 1; |