first commit
This commit is contained in:
27
output/formatter/none_test.go
Normal file
27
output/formatter/none_test.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package formatter_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"gitoa.ru/go-4devs/console/output/formatter"
|
||||
)
|
||||
|
||||
func TestNone(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
none := formatter.None()
|
||||
|
||||
cases := map[string]string{
|
||||
"<info>message info</info>": "message info",
|
||||
"<error>message error</error>": "message error",
|
||||
"<comment><scheme></comment>": "<scheme>",
|
||||
"<body>body</body>": "<body>body</body>",
|
||||
}
|
||||
|
||||
for msg, ex := range cases {
|
||||
got := none.Format(ctx, msg)
|
||||
if ex != got {
|
||||
t.Errorf("expect:%#v, got:%#v", ex, got)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user