diff --git a/tests/valid/string/start-mb.json b/tests/valid/string/start-mb.json new file mode 100644 index 0000000..523dacc --- /dev/null +++ b/tests/valid/string/start-mb.json @@ -0,0 +1,9 @@ +{ + "s1": {"type": "string", "value": "§"}, + "s2": {"type": "string", "value": "§"}, + "s3": {"type": "string", "value": "§"}, + "s4": {"type": "string", "value": "§"}, + "s5": {"type": "string", "value": "§"}, + "s6": {"type": "string", "value": "§"}, + "s7": {"type": "string", "value": "§"} +} diff --git a/tests/valid/string/start-mb.toml b/tests/valid/string/start-mb.toml new file mode 100644 index 0000000..2576f1b --- /dev/null +++ b/tests/valid/string/start-mb.toml @@ -0,0 +1,13 @@ +# Start first line with a multibyte character. +# +# https://github.com/marzer/tomlplusplus/issues/190 +s1 = "§" +s2 = '§' +s3 = """\ +§""" +s4 = """ +§""" +s5 = """§""" +s6 = ''' +§''' +s7 = '''§''' diff --git a/toml_test.go b/toml_test.go index 9aa6fa8..5331638 100644 --- a/toml_test.go +++ b/toml_test.go @@ -138,8 +138,8 @@ func TestSize(t *testing.T) { return nil } - if inf.Size() > 1024 { - t.Errorf("larger than 1K: %s (%fK)", path, float64(inf.Size())/1024) + if inf.Size() > 2048 { + t.Errorf("larger than 2K: %s (%fK)", path, float64(inf.Size())/1024) } return nil })