diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/function/process/buildfile | 5 | ||||
-rw-r--r-- | tests/function/process/testscript | 30 |
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/function/process/buildfile b/tests/function/process/buildfile new file mode 100644 index 0000000..4ea4742 --- /dev/null +++ b/tests/function/process/buildfile @@ -0,0 +1,5 @@ +# file : tests/function/process/buildfile +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +./: testscript $b diff --git a/tests/function/process/testscript b/tests/function/process/testscript new file mode 100644 index 0000000..f01af6f --- /dev/null +++ b/tests/function/process/testscript @@ -0,0 +1,30 @@ +# file : tests/function/process/testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +.include ../../common.test + +: run +: +$* <<EOI >>~/EOO/ +print $process.run($build.path --version) +EOI +/build2 .+/ +/.+/* +EOO + +: run-regex-match +: +$* <<EOI >>~/EOO/ +print $process.run_regex($build.path --version, 'build2 .+') +EOI +/build2 .+/ +EOO + +: run-regex-replace +: +$* <<EOI >>~/EOO/ +print $process.run_regex($build.path --version, 'build2 ([0-9.]+).*', '\1') +EOI +/[0-9]+.[0-9]+.[0-9]+/d +EOO |