diff options
author | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2021-07-29 13:09:23 -0500 |
---|---|---|
committer | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2021-07-29 13:09:23 -0500 |
commit | 2c10158ce92f102280d4d87406ebeea3e05bf915 (patch) | |
tree | 61797fcdea06e128a04af05ce611f9babc0a8775 /snap/parsing_test.go | |
parent | 34d7d612dd376258248ee6cae07b839951fccf32 (diff) | |
download | zsu-2c10158ce92f102280d4d87406ebeea3e05bf915.tar.xz zsu-2c10158ce92f102280d4d87406ebeea3e05bf915.zip |
Added README, Licence, and fixed issue with modules
Diffstat (limited to 'snap/parsing_test.go')
-rw-r--r-- | snap/parsing_test.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/snap/parsing_test.go b/snap/parsing_test.go deleted file mode 100644 index 4aa232e..0000000 --- a/snap/parsing_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package snap - -import "testing" - -func TestRelativeParsing(t * testing.T) { - cases := []struct { - snapish string - snapshot string - offset int - } { - {"snapshot", "snapshot", 0}, - {"testing~~", "testing", -2}, - {"%SNAPSHOT%^+++", "%SNAPSHOT%^", 3}, - {"~~prefixed", "~~prefixed", 0}, - {"+++", "", 3}, - {"~~~", "", -3}, - {"+5", "", 5}, - {"~3", "", -3}, - {"+", "", 1}, - {"~", "", -1}, - {`"~"`, "~", 0}, - } - - for _, c := range cases { - got := ToRelative(c.snapish) - - if got.offset != c.offset || got.snapshot != c.snapshot { - t.Errorf("ToRelative(%s) == %+v, wanted %+v", c.snapish, got, c) - } - } -}
\ No newline at end of file |