package ntest_test import ( "git.noahlan.cn/noahlan/ntool/ntest" "git.noahlan.cn/noahlan/ntool/ntest/assert" "testing" ) func TestNewBuffer(t *testing.T) { buf := ntest.NewBuffer() buf.WriteString("ab", "-", "cd") assert.Eq(t, "ab-cd", buf.ResetAndGet()) buf.WriteAny(23, "abc") assert.Eq(t, "23abc", buf.ResetAndGet()) buf.Writeln("abc") assert.Eq(t, "abc\n", buf.ResetAndGet()) }