diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-27 07:25:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-27 08:41:08 +0200 |
commit | f98b9c87438d40888a6b8d60436a4f644a5364d4 (patch) | |
tree | c7a053133691c1c2fdcbe61531da8ccc22150d97 /tests | |
parent | 57e2aaa28e19da1cd4e51982f46ef2630739ff8a (diff) |
Handle recipes in dependency declarations with prerequisites
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dependency/recipe/testscript | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/tests/dependency/recipe/testscript b/tests/dependency/recipe/testscript index 503ad7e..5510e3c 100644 --- a/tests/dependency/recipe/testscript +++ b/tests/dependency/recipe/testscript @@ -3,17 +3,20 @@ .include ../../common.testscript +# Note: in the parser we have to handle recipes for the with/without +# prerequisites cases separately. So we try to cover both here. + : basics : $* <<EOI 2>>/~%EOE% -alias{x}: +alias{x}: alias{z} {{ cmd }} dump alias{x} EOI <stdin>:5:1: dump: -% .+/alias\{x\}:% +% .+/alias\{x\}: .+/:alias\{z\}% {{ cmd }} @@ -22,14 +25,14 @@ EOE : basics-replay : $* <<EOI 2>>/~%EOE% -alias{x y}: +alias{x y}: alias{z} {{ cmd }} dump alias{y} EOI <stdin>:5:1: dump: -% .+/alias\{y\}:% +% .+/alias\{y\}: .+/:alias\{z\}% {{ cmd }} @@ -110,7 +113,7 @@ EOE : with-vars-replay : $* <<EOI 2>>/~%EOE% -alias{x y}: +alias{x y}: alias{z} { var = x } @@ -120,7 +123,7 @@ alias{x y}: dump alias{y} EOI <stdin>:8:1: dump: -% .+/alias\{y\}:% +% .+/alias\{y\}: .+/:alias\{z\}% { var = x } @@ -132,7 +135,7 @@ EOE : with-vars-header : $* <<EOI 2>>/~%EOE% -alias{x}: +alias{x}: alias{z} { var = x } @@ -143,7 +146,30 @@ alias{x}: dump alias{x} EOI <stdin>:9:1: dump: -% .+/alias\{x\}:% +% .+/alias\{x\}: .+/:alias\{z\}% + { + var = x + } + {{ + cmd + }} +EOE + +: with-vars-header-replay +: +$* <<EOI 2>>/~%EOE% +alias{x y}: +{ + var = x +} +% +{{ + cmd +}} +dump alias{y} +EOI +<stdin>:9:1: dump: +% .+/alias\{y\}:% { var = x } @@ -177,7 +203,7 @@ EOE : chain-replay : $* <<EOI 2>>/~%EOE% -alias{x y}: +alias{x y}: alias{z} {{ cmd1 }} @@ -187,7 +213,7 @@ alias{x y}: dump alias{y} EOI <stdin>:8:1: dump: -% .+/alias\{y\}:% +% .+/alias\{y\}: .+/:alias\{z\}% {{ cmd1 }} @@ -199,7 +225,7 @@ EOE : chain-header : $* <<EOI 2>>/~%EOE% -alias{x}: +alias{x}: alias{z} {{ cmd1 @@ -212,7 +238,7 @@ alias{x}: dump alias{x} EOI <stdin>:11:1: dump: -% .+/alias\{x\}:% +% .+/alias\{x\}: .+/:alias\{z\}% {{ cmd1 }} |