diff options
Diffstat (limited to 'tcl_test.go')
-rw-r--r-- | tcl_test.go | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tcl_test.go b/tcl_test.go index 88c34be..8d5b063 100644 --- a/tcl_test.go +++ b/tcl_test.go @@ -1,6 +1,9 @@ package tcl -import "testing" +import ( + "io/ioutil" + "testing" +) func TestFirst(t *testing.T) { input := `#TMSH-VERSION: 12.1.2 @@ -21,7 +24,8 @@ auth user admin { } } shell bash -}` +} +` d, e := ParseDebug(input) if e != nil { @@ -31,3 +35,17 @@ auth user admin { t.Logf("got d: %#v\n", d) } + +func TestExample2(t *testing.T) { + input, err := ioutil.ReadFile("testdata/example2.conf") + if err != nil { + t.Fatal(err) + } + d, e := ParseDebug(string(input)) + if e != nil { + t.Fatal(e) + } + + t.Logf("got d: %#v\n", d) + +} |