From f98b9c87438d40888a6b8d60436a4f644a5364d4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 27 May 2020 07:25:05 +0200 Subject: Handle recipes in dependency declarations with prerequisites --- tests/dependency/recipe/testscript | 50 +++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 12 deletions(-) (limited to 'tests') 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 : $* <>/~%EOE% -alias{x}: +alias{x}: alias{z} {{ cmd }} dump alias{x} EOI :5:1: dump: -% .+/alias\{x\}:% +% .+/alias\{x\}: .+/:alias\{z\}% {{ cmd }} @@ -22,14 +25,14 @@ EOE : basics-replay : $* <>/~%EOE% -alias{x y}: +alias{x y}: alias{z} {{ cmd }} dump alias{y} EOI :5:1: dump: -% .+/alias\{y\}:% +% .+/alias\{y\}: .+/:alias\{z\}% {{ cmd }} @@ -110,7 +113,7 @@ EOE : with-vars-replay : $* <>/~%EOE% -alias{x y}: +alias{x y}: alias{z} { var = x } @@ -120,7 +123,7 @@ alias{x y}: dump alias{y} EOI :8:1: dump: -% .+/alias\{y\}:% +% .+/alias\{y\}: .+/:alias\{z\}% { var = x } @@ -132,7 +135,7 @@ EOE : with-vars-header : $* <>/~%EOE% -alias{x}: +alias{x}: alias{z} { var = x } @@ -143,7 +146,30 @@ alias{x}: dump alias{x} EOI :9:1: dump: -% .+/alias\{x\}:% +% .+/alias\{x\}: .+/:alias\{z\}% + { + var = x + } + {{ + cmd + }} +EOE + +: with-vars-header-replay +: +$* <>/~%EOE% +alias{x y}: +{ + var = x +} +% +{{ + cmd +}} +dump alias{y} +EOI +:9:1: dump: +% .+/alias\{y\}:% { var = x } @@ -177,7 +203,7 @@ EOE : chain-replay : $* <>/~%EOE% -alias{x y}: +alias{x y}: alias{z} {{ cmd1 }} @@ -187,7 +213,7 @@ alias{x y}: dump alias{y} EOI :8:1: dump: -% .+/alias\{y\}:% +% .+/alias\{y\}: .+/:alias\{z\}% {{ cmd1 }} @@ -199,7 +225,7 @@ EOE : chain-header : $* <>/~%EOE% -alias{x}: +alias{x}: alias{z} {{ cmd1 @@ -212,7 +238,7 @@ alias{x}: dump alias{x} EOI :11:1: dump: -% .+/alias\{x\}:% +% .+/alias\{x\}: .+/:alias\{z\}% {{ cmd1 }} -- cgit v1.1