projects
/
project
/
firewall4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72b196d
)
tests: fix mocked `fd.read("line")` api
author
Jo-Philipp Wich
<jo@mein.io>
Mon, 9 May 2022 08:49:43 +0000
(10:49 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Mon, 9 May 2022 08:49:43 +0000
(10:49 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
tests/lib/mocklib/fs.uc
patch
|
blob
|
history
diff --git
a/tests/lib/mocklib/fs.uc
b/tests/lib/mocklib/fs.uc
index 6e2655274017be2570bcee93ca2944cddc15394b..3cb6252a777f231a465b7fea1f4ecd57cc92abe2 100644
(file)
--- a/
tests/lib/mocklib/fs.uc
+++ b/
tests/lib/mocklib/fs.uc
@@
-110,9
+110,9
@@
return {
case "line":
let i = index(mock, "\n");
- i = (i > -1) ? i + 1 :
mock.length
;
+ i = (i > -1) ? i + 1 :
length(mock)
;
rv = substr(mock, 0, i);
- mock =
substr(mock, i)
;
+ mock =
length(mock) ? substr(mock, i) : null
;
break;
default: