diff options
Diffstat (limited to 'tests/sauer/command.cpp')
-rw-r--r-- | tests/sauer/command.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/sauer/command.cpp b/tests/sauer/command.cpp index 1037032f..0b0afc68 100644 --- a/tests/sauer/command.cpp +++ b/tests/sauer/command.cpp @@ -1402,10 +1402,15 @@ void fatal(const char *s, ...) // failure exit exit(EXIT_FAILURE); } +VARP(somevar, 0, 0, 1024); + int main() { - execute("echo Hello from sauer"); - + execute("somevar 9"); + execute("temp = (+ 22 $somevar)"); + execute("if (> $temp 30) [ temp = (+ $temp 1) ] [ temp = (* $temp 2) ]"); + execute("echo [*Temp is] $temp"); + printf("%d*\n", getvar("somevar")); return 0; } |