diff options
author | Özgür Kesim <oec@codeblau.de> | 2019-06-17 08:47:04 +0200 |
---|---|---|
committer | Özgür Kesim <oec@codeblau.de> | 2019-06-17 08:47:04 +0200 |
commit | 7eb0b697dc157dfef2b7d4599b846788e7709ba3 (patch) | |
tree | b851cc7529b07f3e28dba116b94e11a41c260017 /tcl_test.go | |
parent | 9247710ccb1915a68d05dce81627ca99fc48b994 (diff) |
lexing successfully with larger example
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) + +} |