From 0a56fad112fb59b07fa3ea03fe26b41b451ab886 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 13 Oct 2022 12:00:09 +0200 Subject: Update old tests to public/private variable model --- old-tests/variable/override/buildfile | 48 ++++++++++++------------- old-tests/variable/override/p/buildfile | 42 +++++++++++----------- old-tests/variable/override/simple | 2 +- old-tests/variable/override/test.sh | 62 ++++++++++++++++----------------- 4 files changed, 77 insertions(+), 77 deletions(-) (limited to 'old-tests/variable/override') diff --git a/old-tests/variable/override/buildfile b/old-tests/variable/override/buildfile index 2889f69..87dc273 100644 --- a/old-tests/variable/override/buildfile +++ b/old-tests/variable/override/buildfile @@ -1,57 +1,57 @@ -if ($t != [null]) +if ($p.t != [null]) { - [$t] v = [null] + [$p.t] p.v = [null] } -print "/ :" $(/: v) +print "/ :" $(/: p.v) -if ($a == as) +if ($p.a == as) { - v = x + p.v = x } -elif ($a == ap) +elif ($p.a == ap) { - v += s + p.v += s } -elif ($a == pr) +elif ($p.a == pr) { - v =+ p + p.v =+ p } -print ". :" $v +print ". :" $p.v d/ { - if ($d_a == as) + if ($p.d_a == as) { - v = x + p.v = x } - elif ($d_a == ap) + elif ($p.d_a == ap) { - v += s + p.v += s } - elif ($d_a == pr) + elif ($p.d_a == pr) { - v =+ p + p.v =+ p } - print "d :" $v + print "d :" $p.v - if ($d_t_a == as) + if ($p.d_t_a == as) { - file{t}: v = x + file{t}: p.v = x } - elif ($d_t_a == ap) + elif ($p.d_t_a == ap) { - file{t}: v += s + file{t}: p.v += s } - elif ($d_t_a == pr) + elif ($p.d_t_a == pr) { - file{t}: v =+ p + file{t}: p.v =+ p } - print "d/t :" $(file{t}: v) + print "d/t :" $(file{t}: p.v) } include p/ diff --git a/old-tests/variable/override/p/buildfile b/old-tests/variable/override/p/buildfile index 5b84925..166d869 100644 --- a/old-tests/variable/override/p/buildfile +++ b/old-tests/variable/override/p/buildfile @@ -1,49 +1,49 @@ -if ($p_a == as) +if ($p.p_a == as) { - v = x + p.v = x } -elif ($p_a == ap) +elif ($p.p_a == ap) { - v += s + p.v += s } -elif ($p_a == pr) +elif ($p.p_a == pr) { - v =+ p + p.v =+ p } -print "p :" $v +print "p :" $p.v d/ { - if ($p_d_a == as) + if ($p.p_d_a == as) { - v = x + p.v = x } - elif ($p_d_a == ap) + elif ($p.p_d_a == ap) { - v += s + p.v += s } - elif ($p_d_a == pr) + elif ($p.p_d_a == pr) { - v =+ p + p.v =+ p } - print "p/d :" $v + print "p/d :" $p.v - if ($p_d_t_a == as) + if ($p.p_d_t_a == as) { - file{t}: v = x + file{t}: p.v = x } - elif ($p_d_t_a == ap) + elif ($p.p_d_t_a == ap) { - file{t}: v += s + file{t}: p.v += s } - elif ($p_d_t_a == pr) + elif ($p.p_d_t_a == pr) { - file{t}: v =+ p + file{t}: p.v =+ p } - print "p/d/t :" $(file{t}: v) + print "p/d/t :" $(file{t}: p.v) } ./: diff --git a/old-tests/variable/override/simple b/old-tests/variable/override/simple index 899daa2..983401a 100644 --- a/old-tests/variable/override/simple +++ b/old-tests/variable/override/simple @@ -1,3 +1,3 @@ -print $foo +print $p.foo ./: diff --git a/old-tests/variable/override/test.sh b/old-tests/variable/override/test.sh index 1374e46..fe89c56 100755 --- a/old-tests/variable/override/test.sh +++ b/old-tests/variable/override/test.sh @@ -53,16 +53,16 @@ function test () fi } -fail "foo= [string] bar" # error: typed override of variable foo -#fail "!foo=bar" "!foo=BAR" # error: multiple global overrides of variable foo -#fail "foo=bar" "foo=BAR" # error: multiple project overrides of variable foo -#fail "%foo=bar" "%foo=BAR" # error: multiple project overrides of variable foo +fail "p.foo= [string] bar" # error: typed override of variable p.foo +#fail "!p.foo=bar" "!p.foo=BAR" # error: multiple global overrides of variable p.foo +#fail "p.foo=bar" "p.foo=BAR" # error: multiple project overrides of variable p.foo +#fail "%p.foo=bar" "%p.foo=BAR" # error: multiple project overrides of variable p.foo -test --buildfile simple foo=bar ./ ./ <<< "bar" # Multiple bootstraps of the same project. +test --buildfile simple p.foo=bar ./ ./ <<< "bar" # Multiple bootstraps of the same project. # Visibility/qualification. # -test !v=X <