mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-22 13:01:33 +02:00
Add more tests
This commit is contained in:
parent
710e4dd901
commit
1aae1be8a6
@ -303,3 +303,22 @@ func TestChunks(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestZshWeirdness(t *testing.T) {
|
||||||
|
testcases := []struct {
|
||||||
|
input string
|
||||||
|
isWeird bool
|
||||||
|
}{
|
||||||
|
{": 1666062975:0;bash", true},
|
||||||
|
{": 16660:0;ls", true},
|
||||||
|
{"ls", false},
|
||||||
|
{"0", false},
|
||||||
|
{"hgffddxsdsrzsz xddfgdxfdv gdfc ghcvhgfcfg vgv", false},
|
||||||
|
}
|
||||||
|
for _, tc := range testcases {
|
||||||
|
actual := isZshWeirdness(tc.input)
|
||||||
|
if !reflect.DeepEqual(actual, tc.isWeird) {
|
||||||
|
t.Fatalf("weirdness failure for %#v", tc.input)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user