Soft'N'Design Software
/
projects
/
calc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3a71536
)
missing help for option -i
author
Laurent Mazet
<mazet@softndesign.org>
Fri, 29 Dec 2023 09:35:03 +0000
(10:35 +0100)
committer
Laurent Mazet
<mazet@softndesign.org>
Fri, 29 Dec 2023 09:35:03 +0000
(10:35 +0100)
calc.c
patch
|
blob
|
blame
|
history
diff --git
a/calc.c
b/calc.c
index beae0c1dd098e1dc4ad11c947bb6b0a7d69c9250..8ae39fe58798026b6c18ad6016316134305c264b 100644
(file)
--- a/
calc.c
+++ b/
calc.c
@@
-37,6
+37,7
@@
int usage (int ret)
fprintf (fid, "usage: %s\n", progname);
fprintf (fid, " -h : help message\n");
fprintf (fid, " -b : in/out-put base (%s)\n", show_base ());
fprintf (fid, "usage: %s\n", progname);
fprintf (fid, " -h : help message\n");
fprintf (fid, " -b : in/out-put base (%s)\n", show_base ());
+ fprintf (fid, " -i : input prompt (%s)\n", oprompt);
fprintf (fid, " -n : no readline mode (%s)\n", mode ? "yes" : "no");
fprintf (fid, " -n : no readline mode (%s)\n", mode ? "yes" : "no");
fprintf (fid, " -o : output prompt (%s)\n", oprompt);
fprintf (fid, " -n : no readline mode (%s)\n", mode ? "yes" : "no");
fprintf (fid, " -n : no readline mode (%s)\n", mode ? "yes" : "no");
fprintf (fid, " -o : output prompt (%s)\n", oprompt);
@@
-242,6
+243,7
@@
int main (int argc, char *argv[])
// test: calc.exe -p 2>&1 | grep -q 'missing precision'
// test: calc.exe -v 2>&1 | grep -q 'missing verbose'
// test: echo "1 + 1" | calc.exe -i '# ' | grep -q '# 1 + 1'
// test: calc.exe -p 2>&1 | grep -q 'missing precision'
// test: calc.exe -v 2>&1 | grep -q 'missing verbose'
// test: echo "1 + 1" | calc.exe -i '# ' | grep -q '# 1 + 1'
+// test: echo "1 + 1" | calc.exe -i '# ' -i 'x ' | grep -q 'x 1 + 1'
// test: echo "1 + 1" | calc.exe -o '# ' | grep -q '# 2'
// test: echo "1 + 1" | calc.exe -o '# ' -o 'x ' | grep -q 'x 2'
// test: echo "1 + 2" | calc.exe | grep -q '=> 3'
// test: echo "1 + 1" | calc.exe -o '# ' | grep -q '# 2'
// test: echo "1 + 1" | calc.exe -o '# ' -o 'x ' | grep -q 'x 2'
// test: echo "1 + 2" | calc.exe | grep -q '=> 3'