Changes to support #29 - Support multi-line literal strings
* Added error output to test_program.go * Added multi-line literal string support to lexer * Added multi-line string supprt to lexer * Added unit-test for new string support * Modified test.sh to take an optional parameter to run an individual BurntSushi test suite. * Fixed formatting
This commit is contained in:
+2
-3
@@ -91,18 +91,17 @@ func TestSimpleDate(t *testing.T) {
|
||||
func TestDateOffset(t *testing.T) {
|
||||
tree, err := Load("a = 1979-05-27T00:32:00-07:00")
|
||||
assertTree(t, tree, err, map[string]interface{}{
|
||||
"a": time.Date(1979, time.May, 27, 0, 32, 0, 0, time.FixedZone("", -7 * 60 * 60)),
|
||||
"a": time.Date(1979, time.May, 27, 0, 32, 0, 0, time.FixedZone("", -7*60*60)),
|
||||
})
|
||||
}
|
||||
|
||||
func TestDateNano(t *testing.T) {
|
||||
tree, err := Load("a = 1979-05-27T00:32:00.999999999-07:00")
|
||||
assertTree(t, tree, err, map[string]interface{}{
|
||||
"a": time.Date(1979, time.May, 27, 0, 32, 0, 999999999, time.FixedZone("", -7 * 60 * 60)),
|
||||
"a": time.Date(1979, time.May, 27, 0, 32, 0, 999999999, time.FixedZone("", -7*60*60)),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
func TestSimpleString(t *testing.T) {
|
||||
tree, err := Load("a = \"hello world\"")
|
||||
assertTree(t, tree, err, map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user