Debian Codegraph @

testscript/testdata/setcmd.txt

raw
1 # A command registered with SetCmd becomes available for the rest of the test.
2 register greet 'hello world'
3 greet
4 stdout '^hello world$'
5
6 # A second registration works too, and re-registering replaces the command.
7 register other 'goodbye'
8 other
9 stdout '^goodbye$'
10
11 register greet 'hi again'
12 greet
13 stdout '^hi again$'
14
15 # Registry a random name and check that it's not exec-able
16 # (we're registering commands not executables)
17 env name=d8e3ec30-d063-4f54-a9e6-b40eb830252a
18 register $name x
19 ! exec $name