You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
572 B
29 lines
572 B
package formatter_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"gitoa.ru/go-4devs/console/output/formatter"
|
|
)
|
|
|
|
func TestNone(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
|