diff options
Diffstat (limited to 'testsuite/make.tests')
-rwxr-xr-x | testsuite/make.tests | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/make.tests b/testsuite/make.tests index 546dca7d5..fdbb4ccfc 100755 --- a/testsuite/make.tests +++ b/testsuite/make.tests | |||
@@ -377,6 +377,31 @@ target: | |||
377 | b} | 377 | b} |
378 | ' | 378 | ' |
379 | 379 | ||
380 | # The CURDIR macro is supported in POSIX 202X. | ||
381 | testing "make CURDIR macro" \ | ||
382 | "make -f -" \ | ||
383 | "OK\n" "" ' | ||
384 | target: | ||
385 | @test "$(CURDIR)" = "$$(pwd)" && echo OK | ||
386 | ' | ||
387 | # The CURDIR environment variable doesn't affect the macro | ||
388 | export CURDIR=/you/are/here | ||
389 | testing "make CURDIR macro not affected by environment" \ | ||
390 | "make -f -" \ | ||
391 | "OK\n" "" ' | ||
392 | target: | ||
393 | @test "$(CURDIR)" != "/you/are/here" && echo OK | ||
394 | ' | ||
395 | |||
396 | # The -e option makes the CURDIR macro match the environment | ||
397 | testing "make with -e CURDIR macro is affected by the environment" \ | ||
398 | "make -e -f -" \ | ||
399 | "/you/are/here\n" "" ' | ||
400 | target: | ||
401 | @echo $(CURDIR) | ||
402 | ' | ||
403 | unset CURDIR | ||
404 | |||
380 | # POSIX 202X permits additional characters in macro and target names | 405 | # POSIX 202X permits additional characters in macro and target names |
381 | testing "make allow - and / in target names, - in macro names" \ | 406 | testing "make allow - and / in target names, - in macro names" \ |
382 | "make -f -" \ | 407 | "make -f -" \ |