diff options
Diffstat (limited to 'vietoaq/vietoaq_test.go')
| -rw-r--r-- | vietoaq/vietoaq_test.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/vietoaq/vietoaq_test.go b/vietoaq/vietoaq_test.go new file mode 100644 index 0000000..15a2455 --- /dev/null +++ b/vietoaq/vietoaq_test.go @@ -0,0 +1,33 @@ +package vietoaq + +import ( + "testing" +) + +var ( + examples = map[string]string{ + ``: ``, + `bbb`: `bbb`, + `jảq hủı óq`: `jam huin xob`, + `ýhō`: `xyphor`, + `gı'aq`: `gixaq`, + `gï'aq`: `gixxaq`, + `jảq'a`: `jamxa`, + `gï aq`: `gix xaq`, + `aq'aq aq`: `xaqxaq xaq`, + } +) + +func TestVietoaq(t *testing.T) { + for regular, vietoaq := range examples { + vietoaq_ := To(regular) + if vietoaq_ != vietoaq { + t.Errorf(" to: %s -> %s != %s", regular, vietoaq_, vietoaq) + } + regular_ := From(vietoaq) + if regular_ != regular { + t.Errorf("from: %s -> %s != %s", vietoaq, regular_, regular) + } + } +} + |
