diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-10-20 19:39:57 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-10-21 11:50:52 +0300 |
commit | 4881a227779a78db1de2a7723e2a86f2b61453b3 (patch) | |
tree | c85ca613cc1a9dc4952d0cc7b0c55603f2b4edfa /tests/recipe/buildscript | |
parent | e5efed8e25180b9d009edf2a06e5151db107e883 (diff) |
Change attribute syntax in script to come after variable in set and for (set x [...], for x [...])
Diffstat (limited to 'tests/recipe/buildscript')
-rw-r--r-- | tests/recipe/buildscript/testscript | 71 |
1 files changed, 52 insertions, 19 deletions
diff --git a/tests/recipe/buildscript/testscript b/tests/recipe/buildscript/testscript index 94eb665..6d33888 100644 --- a/tests/recipe/buildscript/testscript +++ b/tests/recipe/buildscript/testscript @@ -1332,30 +1332,63 @@ if $posix : misuse : { - echo 'bar' >=bar; - echo 'baz' >=baz; + : after-var + { + echo 'bar' >=bar; + echo 'baz' >=baz; - cat <<EOI >=buildfile; - foo: bar - {{ - diag gen ($>) + cat <<EOI >=buildfile; + foo: bar + {{ + diag gen ($>) - p = $path($>) - rm -f $p + p = $path($>) + rm -f $p - echo $path($<) | for x: - cat $f >>$p - end - }} - EOI + echo $path($<) | for x: + cat $f >>$p + end + }} + EOI - $* 2>>~%EOE% != 0; - gen file{foo.} - buildfile:8:3: error: for: ':' after variable name - %.+ - EOE + $* 2>>~%EOE% != 0; + gen file{foo.} + buildfile:8:3: error: for: ':' after variable name + %.+ + EOE - $* clean 2>- + $* clean 2>- + } + + : after-attrs + { + echo 'bar' >=bar; + echo 'baz' >=baz; + + cat <<EOI >=buildfile; + foo: bar + {{ + diag gen ($>) + + p = $path($>) + rm -f $p + + echo $path($<) | for x [path]: + cat $f >>$p + end + }} + EOI + + $* 2>>~%EOE% != 0; + gen file{foo.} + <attributes>:1:7: error: whitespace required after attributes + <attributes>:1:1: info: use the '\[' escape sequence if this is a wildcard pattern + buildfile:8:3: info: while parsing attributes '[path]:' + %.+ + EOE + + $* clean 2>- + } } : exit |