Skip to content

Commit

Permalink
Test line with a comment produces error #25
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Dec 21, 2024
1 parent a23634d commit 282a13a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fhtagn.awk
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function prefixFile(prefix, fname, l,res,err) {
return res
}
function run(code,stdOutF,stdErrF) {
return system("(" code ") 1>" stdOutF " 2>" stdErrF) # can it be that {} are better than ()?
return system("{" code "\n} 1>" stdOutF " 2>" stdErrF)
}
function rndS() { return int(2147483647 * rand()) "." Rnd }
function tmpFile(random, ext) { return sprintf("%s/%s.%s.%s", Tmp, Prog, random, ext) }
8 changes: 7 additions & 1 deletion tests/3.tush
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ testing the 2nd test goes immediately after the 1st
$ echo aaa
| aaa
$ echo bbb
| BBB
| BBB

testing line with a comment
===========================

$ echo aaa # comment
| aaa
2 changes: 1 addition & 1 deletion tests/fhtagn.tush
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $ cd "$MYDIR"; ALL=1 ./tests/trimBlank.sh $FHTAGN tests/1.tush tests/2.tush test
| -| BBB
| +| bbb
| ---blank---
| result=FAIL, failure=2, success=4, total=6, files=3
| result=FAIL, failure=2, success=5, total=7, files=3
? 1

$ cd "$MYDIR"; ALL=1 ./tests/trimBlank.sh $FHTAGN tests/1.tush
Expand Down

0 comments on commit 282a13a

Please sign in to comment.