From 4881a227779a78db1de2a7723e2a86f2b61453b3 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 20 Oct 2022 19:39:57 +0300 Subject: Change attribute syntax in script to come after variable in set and for (set x [...], for x [...]) --- tests/recipe/buildscript/testscript | 71 +++++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 19 deletions(-) (limited to 'tests/recipe/buildscript') 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 <=buildfile; - foo: bar - {{ - diag gen ($>) + cat <=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 <=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.} + :1:7: error: whitespace required after 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 -- cgit v1.1