diff options
author | Alex Crichton <alex@alexcrichton.com> | 2015-01-15 17:27:53 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-15 17:34:27 -0800 |
commit | 0285af245aaf649c0528575ff7bd03838b31c743 (patch) | |
tree | dbfe3937b15bb0b0ffc1f93ece94e82dd7e7099a /tests | |
parent | bc825a5fb538d5860026f3d4679459a6cc50f9fc (diff) | |
download | milf-rs-0285af245aaf649c0528575ff7bd03838b31c743.tar.gz milf-rs-0285af245aaf649c0528575ff7bd03838b31c743.zip |
Implement new rules for bare key names
* Key names are restricted to [a-zA-Z0-9_-]
* Equal signs must be on the same line (as must the next value) as the key
* Quoted keys are allowed and are parsed as basic strings.
Closes #48
Diffstat (limited to 'tests')
-rw-r--r-- | tests/valid/hard_example.toml | 6 | ||||
-rw-r--r-- | tests/valid/key-special-chars.toml | 2 | ||||
-rw-r--r-- | tests/valid/key-with-pound.toml | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/valid/hard_example.toml b/tests/valid/hard_example.toml index 1d5d8e9..6c47b2c 100644 --- a/tests/valid/hard_example.toml +++ b/tests/valid/hard_example.toml @@ -12,9 +12,9 @@ test_string = "You'll hate me after this - #" # " Annoying, isn't it? another_test_string = " Same thing, but with a string #" harder_test_string = " And when \"'s are in the string, along with # \"" # "and comments are there too" # Things will get harder - + [the.hard.bit#] - what? = "You don't think some user won't do that?" + "what?" = "You don't think some user won't do that?" multi_line_array = [ "]", # ] Oh yes I did @@ -30,4 +30,4 @@ test_string = "You'll hate me after this - #" # " Annoying, isn't it? # "or here, # and here" # ] End of array comment, forgot the # -#number = 3.14 pi <--again forgot the # +#number = 3.14 pi <--again forgot the # diff --git a/tests/valid/key-special-chars.toml b/tests/valid/key-special-chars.toml index 8b3fc51..dc43625 100644 --- a/tests/valid/key-special-chars.toml +++ b/tests/valid/key-special-chars.toml @@ -1 +1 @@ -~!@#$^&*()_+-`1234567890[]\|/?><.,;:' = 1 +"~!@#$^&*()_+-`1234567890[]\\|/?><.,;:'" = 1 diff --git a/tests/valid/key-with-pound.toml b/tests/valid/key-with-pound.toml index 1c54f53..65b766f 100644 --- a/tests/valid/key-with-pound.toml +++ b/tests/valid/key-with-pound.toml @@ -1 +1 @@ -key#name = 5 +"key#name" = 5 |