aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/util
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2024-10-09 12:24:26 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2024-10-09 12:24:26 -0400
commit2eb8f5aa5ab551f9145eec0bb11351798f6f3b8d (patch)
tree7e77250de5c717a79ec866f74ef05128fc19c8e0 /util
parent11d06bae8f961aaa3667a64bda7aa30f37b1cad4 (diff)
Change test to match correct AnsiFilterWriter behavior
Diffstat (limited to 'util')
-rw-r--r--util/util_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/util_test.go b/util/util_test.go
index fd9b7b8..9c5881d 100644
--- a/util/util_test.go
+++ b/util/util_test.go
@@ -53,8 +53,9 @@ func testAnsiFilterWriter(t *testing.T, input string, expected string) {
t.Fatal("Error while writting input", err)
}
- if n != len(expected) {
- t.Errorf("Expected to write %d bytes but read %d\n", len(expected), n)
+ // NOTE: we expect the size of input to be written to indicate those bytes have been consumed by the writer
+ if n != len(input) {
+ t.Errorf("Expected to write %d bytes but wrote %d\n", len(input), n)
}
result := writer.String()