encodedText_test.go 366 B

1234567891011121314151617181920
  1. package weirdtext
  2. import (
  3. "testing"
  4. )
  5. func TestInvalidPrefix(t *testing.T) {
  6. input := `
  7. ---weir---
  8. Tihs is a lnog lnooog tset setcnnee,
  9. wtih smoe big (biiiiig) wdros!
  10. ---weir---
  11. This long looong sentence some test with words`
  12. test := EncodedText{}
  13. err := test.FromString(input)
  14. if err == nil {
  15. t.Errorf("There should be error as prefix is invalid!")
  16. }
  17. }