OSDN Git Service

log into file (#357)
[bytom/vapor.git] / vendor / github.com / lestrrat-go / strftime / internal_test.go
diff --git a/vendor/github.com/lestrrat-go/strftime/internal_test.go b/vendor/github.com/lestrrat-go/strftime/internal_test.go
new file mode 100644 (file)
index 0000000..eaee1d5
--- /dev/null
@@ -0,0 +1,28 @@
+package strftime
+
+import (
+       "testing"
+
+       "github.com/stretchr/testify/assert"
+)
+
+func TestCombine(t *testing.T) {
+       {
+               s, _ := New(`%A foo`)
+               if !assert.Equal(t, 1, len(s.compiled), "there are 1 element") {
+                       return
+               }
+       }
+       {
+               s, _ := New(`%A 100`)
+               if !assert.Equal(t, 2, len(s.compiled), "there are two elements") {
+                       return
+               }
+       }
+       {
+               s, _ := New(`%A Mon`)
+               if !assert.Equal(t, 2, len(s.compiled), "there are two elements") {
+                       return
+               }
+       }
+}