]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] coverage: $(am__newline) should never be stripped off
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 7 Jul 2012 18:38:03 +0000 (20:38 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 7 Jul 2012 20:57:38 +0000 (22:57 +0200)
But currently it is, if placed at the end of another macro expansion.
The issue will be fixed by a later patch.  For the moment ...

* t/internals.sh: ... expose it here, with two new xfailing checks.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/internals.tap

index aaf6b9399d083853ba79f5bd6c30ac4eed4e34dd..c94163c481dd51b87d410225a2c247dcd329cb62 100755 (executable)
@@ -19,7 +19,7 @@
 am_create_testdir=empty
 . ./defs || exit 1
 
-plan_ 8
+plan_ 10
 
 cp "$am_amdir"/header-vars.am . \
   || fatal_ "fetching makefile fragment headers-vars.am"
@@ -162,12 +162,27 @@ test-canonicalize:
        test '$(call am__canon,$(bslash)$(comma))' = '__'
        test '$(call am__canon,x$(comma)@$(bslash))' = 'x_@_'
 
-.PHONY: test-newline
-test-newline:
-       @echo OK > foo$(am__newline)@touch bar$(am__newline)-false > baz
-       test `cat foo` = OK
-       test -f bar
-       test -f baz
+.PHONY: test-newline-1
+test-newline-1:
+       @echo OK > fo1$(am__newline)@touch ba1$(am__newline)-false > qu1
+       test `cat fo1` = OK
+       test -f ba1
+       test -f qu1
+
+my_newline = $(am__newline)
+.PHONY: test-newline-2
+test-newline-2:
+       @echo OK > fo2$(my_newline)@touch ba2$(my_newline)-false > qu2
+       test `cat fo2` = OK
+       test -f ba2
+       test -f qu2
+
+command-1 = test x = x$(am__newline)
+command-2 = test y = y$(my_newline)
+.PHONY: test-newline-3
+test-newline-3:
+       $(command-1)$(command-2)touch n3
+       test -f n3
 END
 
 command_ok_  am__strip_firstword        $MAKE test-strip-firstword
@@ -177,6 +192,8 @@ command_ok_  am__test_strip_suffixes    $MAKE test-strip-suffixes
 command_ok_  am__tolower                $MAKE test-tolower
 command_ok_  am__toupper                $MAKE test-toupper
 command_ok_  am__canon                  $MAKE test-canonicalize
-command_ok_  am__newline                $MAKE test-newline
+command_ok_  "am__newline (1)"          $MAKE test-newline-1
+command_ok_  "am__newline (2)" -D TODO  $MAKE test-newline-2
+command_ok_  "am__newline (3)" -D TODO  $MAKE test-newline-3
 
 :