diff options
| author | mo khan <mo@mokhan.ca> | 2026-01-30 17:18:31 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2026-01-30 17:18:31 -0700 |
| commit | e4ed0342932b0aa741ee78d9e4fe135eba6e9ca7 (patch) | |
| tree | f1e7f602cb86e78aedf04185b2c2e1428fc5b8f2 /pkg/gitdiff/format_test.go | |
| parent | 83be9ddcf82e8a90ea50a9d54c1ebfc3e22ace16 (diff) | |
initial commit
Diffstat (limited to 'pkg/gitdiff/format_test.go')
| -rw-r--r-- | pkg/gitdiff/format_test.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/pkg/gitdiff/format_test.go b/pkg/gitdiff/format_test.go deleted file mode 100644 index 3325296..0000000 --- a/pkg/gitdiff/format_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package gitdiff - -import ( - "strings" - "testing" -) - -func TestFormatter_WriteQuotedName(t *testing.T) { - tests := []struct { - Input string - Expected string - }{ - {"noquotes.txt", `noquotes.txt`}, - {"no quotes.txt", `no quotes.txt`}, - {"new\nline", `"new\nline"`}, - {"escape\x1B null\x00", `"escape\033 null\000"`}, - {"snowman \u2603 snowman", `"snowman \342\230\203 snowman"`}, - {"\"already quoted\"", `"\"already quoted\""`}, - } - - for _, test := range tests { - var b strings.Builder - newFormatter(&b).WriteQuotedName(test.Input) - if b.String() != test.Expected { - t.Errorf("expected %q, got %q", test.Expected, b.String()) - } - } -} |
