build/pymake/tests/justprint-native.mk

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 ## $(TOUCH) and $(RM) are native commands in pymake.
michael@0 2 ## Test that pymake --just-print just prints them.
michael@0 3
michael@0 4 ifndef TOUCH
michael@0 5 TOUCH = touch
michael@0 6 endif
michael@0 7
michael@0 8 all:
michael@0 9 $(RM) justprint-native-file1.txt
michael@0 10 $(TOUCH) justprint-native-file2.txt
michael@0 11 $(MAKE) --just-print -f $(TESTPATH)/justprint-native.mk justprint_target > justprint.log
michael@0 12 # make --just-print shouldn't have actually done anything.
michael@0 13 test ! -f justprint-native-file1.txt
michael@0 14 test -f justprint-native-file2.txt
michael@0 15 # but it should have printed each command
michael@0 16 grep -q 'touch justprint-native-file1.txt' justprint.log
michael@0 17 grep -q 'rm -f justprint-native-file2.txt' justprint.log
michael@0 18 grep -q 'this string is "unlikely to appear in the log by chance"' justprint.log
michael@0 19 # tidy up
michael@0 20 $(RM) justprint-native-file2.txt
michael@0 21 @echo TEST-PASS
michael@0 22
michael@0 23 justprint_target:
michael@0 24 $(TOUCH) justprint-native-file1.txt
michael@0 25 $(RM) justprint-native-file2.txt
michael@0 26 this string is "unlikely to appear in the log by chance"
michael@0 27
michael@0 28 .PHONY: justprint_target

mercurial