Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Force LF line endings for test makefiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimgr committed Jul 3, 2014
1 parent 3d7023f commit da8b5ad
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 65 deletions.
20 changes: 10 additions & 10 deletions tests/include-regen2.mk
@@ -1,10 +1,10 @@
# make should make makefiles that it has rules for if they are
# included
include test.mk

all:
test "$(X)" = "1"
@echo "TEST-PASS"

test.mk:
@echo "X = 1" > $@
# make should make makefiles that it has rules for if they are
# included
include test.mk

all:
test "$(X)" = "1"
@echo "TEST-PASS"

test.mk:
@echo "X = 1" > $@
20 changes: 10 additions & 10 deletions tests/include-regen3.mk
@@ -1,10 +1,10 @@
# make should make makefiles that it has rules for if they are
# included
-include test.mk

all:
test "$(X)" = "1"
@echo "TEST-PASS"

test.mk:
@echo "X = 1" > $@
# make should make makefiles that it has rules for if they are
# included
-include test.mk

all:
test "$(X)" = "1"
@echo "TEST-PASS"

test.mk:
@echo "X = 1" > $@
56 changes: 28 additions & 28 deletions tests/justprint-native.mk
@@ -1,28 +1,28 @@
## $(TOUCH) and $(RM) are native commands in pymake.
## Test that pymake --just-print just prints them.

ifndef TOUCH
TOUCH = touch
endif

all:
$(RM) justprint-native-file1.txt
$(TOUCH) justprint-native-file2.txt
$(MAKE) --just-print -f $(TESTPATH)/justprint-native.mk justprint_target > justprint.log
# make --just-print shouldn't have actually done anything.
test ! -f justprint-native-file1.txt
test -f justprint-native-file2.txt
# but it should have printed each command
grep -q 'touch justprint-native-file1.txt' justprint.log
grep -q 'rm -f justprint-native-file2.txt' justprint.log
grep -q 'this string is "unlikely to appear in the log by chance"' justprint.log
# tidy up
$(RM) justprint-native-file2.txt
@echo TEST-PASS

justprint_target:
$(TOUCH) justprint-native-file1.txt
$(RM) justprint-native-file2.txt
this string is "unlikely to appear in the log by chance"

.PHONY: justprint_target
## $(TOUCH) and $(RM) are native commands in pymake.
## Test that pymake --just-print just prints them.

ifndef TOUCH
TOUCH = touch
endif

all:
$(RM) justprint-native-file1.txt
$(TOUCH) justprint-native-file2.txt
$(MAKE) --just-print -f $(TESTPATH)/justprint-native.mk justprint_target > justprint.log
# make --just-print shouldn't have actually done anything.
test ! -f justprint-native-file1.txt
test -f justprint-native-file2.txt
# but it should have printed each command
grep -q 'touch justprint-native-file1.txt' justprint.log
grep -q 'rm -f justprint-native-file2.txt' justprint.log
grep -q 'this string is "unlikely to appear in the log by chance"' justprint.log
# tidy up
$(RM) justprint-native-file2.txt
@echo TEST-PASS

justprint_target:
$(TOUCH) justprint-native-file1.txt
$(RM) justprint-native-file2.txt
this string is "unlikely to appear in the log by chance"

.PHONY: justprint_target
10 changes: 5 additions & 5 deletions tests/justprint.mk
@@ -1,5 +1,5 @@
#T commandline: ['-n']

all:
false # without -n, we wouldn't get past this
TEST-PASS # heh
#T commandline: ['-n']

all:
false # without -n, we wouldn't get past this
TEST-PASS # heh
24 changes: 12 additions & 12 deletions tests/native-simple.mk
@@ -1,12 +1,12 @@
ifndef TOUCH
TOUCH = touch
endif

all: testfile {testfile2} (testfile3)
test -f testfile
test -f {testfile2}
test -f "(testfile3)"
@echo TEST-PASS

testfile {testfile2} (testfile3):
$(TOUCH) "$@"
ifndef TOUCH
TOUCH = touch
endif

all: testfile {testfile2} (testfile3)
test -f testfile
test -f {testfile2}
test -f "(testfile3)"
@echo TEST-PASS

testfile {testfile2} (testfile3):
$(TOUCH) "$@"

0 comments on commit da8b5ad

Please sign in to comment.