aboutsummaryrefslogtreecommitdiff
path: root/tests/sauer/command.cpp
diff options
context:
space:
mode:
authoralon@honor <none@none>2010-09-10 20:48:38 -0700
committeralon@honor <none@none>2010-09-10 20:48:38 -0700
commitbcb46261d622c6e6919bab5ccc6506913d5da57a (patch)
tree6897f9c2a5f89d2c923ae7198b448c49d06df25b /tests/sauer/command.cpp
parent325fa82fa01f388ed894a90ffb61da80ba71c379 (diff)
tweaks to sauer, and strtol
Diffstat (limited to 'tests/sauer/command.cpp')
-rw-r--r--tests/sauer/command.cpp9
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;
}