Piotr Czajkowski 3 роки тому
батько
коміт
fbfd455b9c
1 змінених файлів з 20 додано та 0 видалено
  1. 20 0
      encodedText_test.go

+ 20 - 0
encodedText_test.go

@@ -0,0 +1,20 @@
+package weirdtext
+
+import (
+	"testing"
+)
+
+func TestInvalidPrefix(t *testing.T) {
+	input := `
+---weir---
+Tihs is a lnog lnooog tset setcnnee,
+wtih smoe big (biiiiig) wdros!
+---weir---
+This long looong sentence some test with words`
+
+	test := EncodedText{}
+	err := test.FromString(input)
+	if err == nil {
+		t.Errorf("There should be error as prefix is invalid!")
+	}
+}