From 4bf42322fdd5dd7e01a3f61272bccc4a66a5585f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 2 Apr 2016 12:28:56 +0200 Subject: Add attribute syntax infrastructure --- tests/attribute/buildfile | 21 +++++++++++++++++++++ tests/escaping/test.sh | 2 +- tests/eval/test.sh | 2 +- tests/function/call/test.sh | 2 +- tests/if-else/test.sh | 2 +- tests/keyword/test.sh | 2 +- tests/names/test.sh | 2 +- tests/pairs/test.sh | 2 +- tests/quote/test.sh | 2 +- tests/scope/test.sh | 4 ++-- 10 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 tests/attribute/buildfile (limited to 'tests') diff --git a/tests/attribute/buildfile b/tests/attribute/buildfile new file mode 100644 index 0000000..6675894 --- /dev/null +++ b/tests/attribute/buildfile @@ -0,0 +1,21 @@ +#[] # error: standalone attribute sequence +#[foo] # error: standalone attribute sequence +#[[] # error: expected name instead of '[' +#[foo # error: expected ']' instead of +#[dir/file{foo}] # error: invalid attribute key +#[foo=dir/file{bar}] # error: invalid attribute key + +#[foo] print hello # error: attributes before print +#[foo]./: # error: attributes before directory scope +#{ +#} +#[foo]./: # error: attributes before target/scope +#./: [foo] buildfile # error: attributes before prerequisites +#import [foo] libz # error: attributes without variable + +#foo="F[O]O" +#[{x y z}] +#[$foo] +#["[]"] + +./: diff --git a/tests/escaping/test.sh b/tests/escaping/test.sh index b898b3c..afcb3bd 100755 --- a/tests/escaping/test.sh +++ b/tests/escaping/test.sh @@ -1,3 +1,3 @@ #!/bin/sh -valgrind -q b -q | diff -u test.out - +b -q | diff -u test.out - diff --git a/tests/eval/test.sh b/tests/eval/test.sh index b898b3c..afcb3bd 100755 --- a/tests/eval/test.sh +++ b/tests/eval/test.sh @@ -1,3 +1,3 @@ #!/bin/sh -valgrind -q b -q | diff -u test.out - +b -q | diff -u test.out - diff --git a/tests/function/call/test.sh b/tests/function/call/test.sh index b898b3c..afcb3bd 100755 --- a/tests/function/call/test.sh +++ b/tests/function/call/test.sh @@ -1,3 +1,3 @@ #!/bin/sh -valgrind -q b -q | diff -u test.out - +b -q | diff -u test.out - diff --git a/tests/if-else/test.sh b/tests/if-else/test.sh index b898b3c..afcb3bd 100755 --- a/tests/if-else/test.sh +++ b/tests/if-else/test.sh @@ -1,3 +1,3 @@ #!/bin/sh -valgrind -q b -q | diff -u test.out - +b -q | diff -u test.out - diff --git a/tests/keyword/test.sh b/tests/keyword/test.sh index b898b3c..afcb3bd 100755 --- a/tests/keyword/test.sh +++ b/tests/keyword/test.sh @@ -1,3 +1,3 @@ #!/bin/sh -valgrind -q b -q | diff -u test.out - +b -q | diff -u test.out - diff --git a/tests/names/test.sh b/tests/names/test.sh index b898b3c..afcb3bd 100755 --- a/tests/names/test.sh +++ b/tests/names/test.sh @@ -1,3 +1,3 @@ #!/bin/sh -valgrind -q b -q | diff -u test.out - +b -q | diff -u test.out - diff --git a/tests/pairs/test.sh b/tests/pairs/test.sh index b898b3c..afcb3bd 100755 --- a/tests/pairs/test.sh +++ b/tests/pairs/test.sh @@ -1,3 +1,3 @@ #!/bin/sh -valgrind -q b -q | diff -u test.out - +b -q | diff -u test.out - diff --git a/tests/quote/test.sh b/tests/quote/test.sh index b898b3c..afcb3bd 100755 --- a/tests/quote/test.sh +++ b/tests/quote/test.sh @@ -1,3 +1,3 @@ #!/bin/sh -valgrind -q b -q | diff -u test.out - +b -q | diff -u test.out - diff --git a/tests/scope/test.sh b/tests/scope/test.sh index 5bbf0d8..61194f6 100755 --- a/tests/scope/test.sh +++ b/tests/scope/test.sh @@ -2,11 +2,11 @@ # In-tree. # -valgrind b amalgamation/l1/ 2>/dev/null | diff -u test-1.out - +b amalgamation/l1/ 2>/dev/null | diff -u test-1.out - # Out-of-tree. # rm -rf a-out/ b 'configure(amalgamation/@a-out/)' 2>/dev/null -valgrind b amalgamation/l1/@a-out/l1/ 2>/dev/null | diff -u test-2.out - +b amalgamation/l1/@a-out/l1/ 2>/dev/null | diff -u test-2.out - rm -rf a-out/ -- cgit v1.1