mirror of
https://codeberg.org/scip/rpnc.git
synced 2025-12-18 13:01:08 +01:00
avoid fuzzy tester to hit interactive pager
This commit is contained in:
@@ -373,6 +373,8 @@ func FuzzEval(f *testing.F) {
|
|||||||
"b",
|
"b",
|
||||||
"#444",
|
"#444",
|
||||||
"<X",
|
"<X",
|
||||||
|
"?",
|
||||||
|
"help",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, item := range legal {
|
for _, item := range legal {
|
||||||
@@ -384,7 +386,11 @@ func FuzzEval(f *testing.F) {
|
|||||||
var hexnum, hour, min int
|
var hexnum, hour, min int
|
||||||
|
|
||||||
f.Fuzz(func(t *testing.T, line string) {
|
f.Fuzz(func(t *testing.T, line string) {
|
||||||
t.Logf("Stack:\n%v\n", calc.stack.All())
|
t.Logf("Stack:\n%v\nLine: <%s>\n", calc.stack.All(), line)
|
||||||
|
switch line {
|
||||||
|
case "help", "?":
|
||||||
|
return
|
||||||
|
}
|
||||||
if err := calc.EvalItem(line); err == nil {
|
if err := calc.EvalItem(line); err == nil {
|
||||||
t.Logf("given: <%s>", line)
|
t.Logf("given: <%s>", line)
|
||||||
// not corpus and empty?
|
// not corpus and empty?
|
||||||
|
|||||||
Reference in New Issue
Block a user