diff options
author | alon@honor <none@none> | 2010-09-10 20:48:38 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-09-10 20:48:38 -0700 |
commit | bcb46261d622c6e6919bab5ccc6506913d5da57a (patch) | |
tree | 6897f9c2a5f89d2c923ae7198b448c49d06df25b /tests/sauer/command.cpp | |
parent | 325fa82fa01f388ed894a90ffb61da80ba71c379 (diff) |
tweaks to sauer, and strtol
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; } |