From 5007870b52aa549971824959a55ad3bb886f09e0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 3 Sep 2018 16:37:32 +0200 Subject: Rename .test/test{} to .testscript/testscript{} --- tests/value/buildfile | 2 +- tests/value/concat.test | 73 ------------------------------------- tests/value/concat.testscript | 73 +++++++++++++++++++++++++++++++++++++ tests/value/reverse.test | 82 ------------------------------------------ tests/value/reverse.testscript | 82 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 156 insertions(+), 156 deletions(-) delete mode 100644 tests/value/concat.test create mode 100644 tests/value/concat.testscript delete mode 100644 tests/value/reverse.test create mode 100644 tests/value/reverse.testscript (limited to 'tests/value') diff --git a/tests/value/buildfile b/tests/value/buildfile index 1ab26d5..a43074c 100644 --- a/tests/value/buildfile +++ b/tests/value/buildfile @@ -2,4 +2,4 @@ # copyright : Copyright (c) 2014-2018 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -./: test{*} $b +./: testscript{*} $b diff --git a/tests/value/concat.test b/tests/value/concat.test deleted file mode 100644 index 79f004c..0000000 --- a/tests/value/concat.test +++ /dev/null @@ -1,73 +0,0 @@ -# file : tests/value/concat.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -.include ../common.test - -: dir_path -: -{ - : name - : - $* <>/EOO - d = [dir_path] foo - f = bar - print $d/$f - EOI - foo/bar - EOO - - : string - : - $* <>/EOO - d = [dir_path] foo - f = [string] bar - print $d/$f - EOI - foo/bar - EOO - - : leading-separator - : - $* <>/EOO - d = [dir_path] foo - f = /bar - print $d/$f - EOI - foo/bar - EOO - - : not-separated - : - $* <>/EOO - d = [dir_path] foo - f = bar - print $d$f - EOI - foo/bar - EOO -} - -: path -: -{ - : separated - : - $* <>/EOO - d = [path] foo - f = bar - print $d/$f - EOI - foo/bar - EOO - - : not-separated - : - $* <>/EOO - d = [path] foo - f = bar - print $d$f - EOI - foobar - EOO -} diff --git a/tests/value/concat.testscript b/tests/value/concat.testscript new file mode 100644 index 0000000..581c3ad --- /dev/null +++ b/tests/value/concat.testscript @@ -0,0 +1,73 @@ +# file : tests/value/concat.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +.include ../common.testscript + +: dir_path +: +{ + : name + : + $* <>/EOO + d = [dir_path] foo + f = bar + print $d/$f + EOI + foo/bar + EOO + + : string + : + $* <>/EOO + d = [dir_path] foo + f = [string] bar + print $d/$f + EOI + foo/bar + EOO + + : leading-separator + : + $* <>/EOO + d = [dir_path] foo + f = /bar + print $d/$f + EOI + foo/bar + EOO + + : not-separated + : + $* <>/EOO + d = [dir_path] foo + f = bar + print $d$f + EOI + foo/bar + EOO +} + +: path +: +{ + : separated + : + $* <>/EOO + d = [path] foo + f = bar + print $d/$f + EOI + foo/bar + EOO + + : not-separated + : + $* <>/EOO + d = [path] foo + f = bar + print $d$f + EOI + foobar + EOO +} diff --git a/tests/value/reverse.test b/tests/value/reverse.test deleted file mode 100644 index 9ea9d09..0000000 --- a/tests/value/reverse.test +++ /dev/null @@ -1,82 +0,0 @@ -# file : tests/value/reverse.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -# Test reversal to canonical/original representation. -# - -.include ../common.test - -: name -: -{ - : dir - : - $* <>EOO - x = s/foo/bar/ - print ([string] $x) - print "$x" - print -e=$x - EOI - s/foo/bar/ - s/foo/bar/ - -e=s/foo/bar/ - EOO - - : proj - : - $* <>EOO - print ([strings] foo%bar foo% %bar) - EOI - foo%bar foo% %bar - EOO - - : pair - : - $* <>EOO - print ([strings] foo@bar foo/@bar/ foo@ @bar @ "@@") - EOI - foo@bar foo/@bar/ foo@ @bar @ @@ - EOO - - : combined - : - $* <>EOO - print ([strings] xx%foo@yy%bar xx%foo/@yy%bar/) - EOI - xx%foo@yy%bar xx%foo/@yy%bar/ - EOO -} - -: dir-path -: -{ - : rel - : - $* <>"EOO" - x = [dir_path] foo/bar/ - print ([string] $x) - print "$x" - print "-I$x" - EOI - foo/bar/ - foo/bar - -Ifoo/bar - EOO - - : root - : - if ($cxx.target.class != 'windows') - { - $* <>EOO - x = [dir_path] / - print ([string] $x) - print "$x" - print "-I$x" - EOI - / - / - -I/ - EOO - } -} diff --git a/tests/value/reverse.testscript b/tests/value/reverse.testscript new file mode 100644 index 0000000..6294d3f --- /dev/null +++ b/tests/value/reverse.testscript @@ -0,0 +1,82 @@ +# file : tests/value/reverse.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +# Test reversal to canonical/original representation. +# + +.include ../common.testscript + +: name +: +{ + : dir + : + $* <>EOO + x = s/foo/bar/ + print ([string] $x) + print "$x" + print -e=$x + EOI + s/foo/bar/ + s/foo/bar/ + -e=s/foo/bar/ + EOO + + : proj + : + $* <>EOO + print ([strings] foo%bar foo% %bar) + EOI + foo%bar foo% %bar + EOO + + : pair + : + $* <>EOO + print ([strings] foo@bar foo/@bar/ foo@ @bar @ "@@") + EOI + foo@bar foo/@bar/ foo@ @bar @ @@ + EOO + + : combined + : + $* <>EOO + print ([strings] xx%foo@yy%bar xx%foo/@yy%bar/) + EOI + xx%foo@yy%bar xx%foo/@yy%bar/ + EOO +} + +: dir-path +: +{ + : rel + : + $* <>"EOO" + x = [dir_path] foo/bar/ + print ([string] $x) + print "$x" + print "-I$x" + EOI + foo/bar/ + foo/bar + -Ifoo/bar + EOO + + : root + : + if ($cxx.target.class != 'windows') + { + $* <>EOO + x = [dir_path] / + print ([string] $x) + print "$x" + print "-I$x" + EOI + / + / + -I/ + EOO + } +} -- cgit v1.1