UNPKG

1.4 kBPlain TextView Raw
1# Test file for TOML
2# Only this one tries to emulate a TOML file written by a user of the kind of parser writers probably hate
3# This part you'll really hate
4
5[the]
6test_string = "You'll hate me after this - #" # " Annoying, isn't it?
7
8 [the.hard]
9 test_array = [ "] ", " # "] # ] There you go, parse this!
10 test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ]
11 # You didn't think it'd as easy as chucking out the last #, did you?
12 another_test_string = " Same thing, but with a string #"
13 harder_test_string = " And when \"'s are in the string, along with # \"" # "and comments are there too"
14 # Things will get harder
15
16 [the.hard.bit#]
17 what? = "You don't think some user won't do that?"
18 multi_line_array = [
19 "]",
20 # ] Oh yes I did
21 ]
22
23# Each of the following keygroups/key value pairs should produce an error. Uncomment to them to test
24
25#[error] if you didn't catch this, your parser is broken
26#string = "Anything other than tabs, spaces and newline after a keygroup or key value pair has ended should produce an error unless it is a comment" like this
27#array = [
28# "This might most likely happen in multiline arrays",
29# Like here,
30# "or here,
31# and here"
32# ] End of array comment, forgot the #
33#number = 3.14 pi <--again forgot the #