From 4c1a8d88e64f5b7bd1e82878ddc20c06f593df3e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 13 Oct 2022 09:39:04 +0200 Subject: Add test for public/private variable model --- tests/variable/private/buildfile | 4 ++++ tests/variable/private/testscript | 46 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 tests/variable/private/buildfile create mode 100644 tests/variable/private/testscript (limited to 'tests/variable/private') diff --git a/tests/variable/private/buildfile b/tests/variable/private/buildfile new file mode 100644 index 0000000..3b0d20c --- /dev/null +++ b/tests/variable/private/buildfile @@ -0,0 +1,4 @@ +# file : tests/variable/private/buildfile +# license : MIT; see accompanying LICENSE file + +./: testscript $b diff --git a/tests/variable/private/testscript b/tests/variable/private/testscript new file mode 100644 index 0000000..ddb78fd --- /dev/null +++ b/tests/variable/private/testscript @@ -0,0 +1,46 @@ +# file : tests/variable/private/testscript +# license : MIT; see accompanying LICENSE file + +# Test public/private variable mode. + +buildfile = true +test.arguments = 'noop(../)' + +.include ../../common.testscript + ++cat <=build/bootstrap.build +project = test +amalgamation = +subprojects = subproj + +using install +EOI ++cat <=buildfile +[string] foo = abc +print $type($foo) $foo + +subproj/: install = false +print $type($(subproj/: install)) $(subproj/: install) + +include subproj/ +EOI + +: subproj +: +mkdir build; +cat <=build/bootstrap.build; +project = subporj +EOI +cat <=buildfile; +[uint64] foo = 0123 +print $type($foo) $foo + +[bool] install = true +print $type($install) $install +EOI +$* >>EOO +string abc +path false +uint64 123 +bool true +EOO -- cgit v1.1