aboutsummaryrefslogtreecommitdiff
path: root/tests/function/process/testscript
blob: d4fe864f93028a134b6e06ffdea6397c50c53e2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# file      : tests/function/process/testscript
# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

.include ../../common.testscript

: 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