Newer
Older
{ test_empty =
expr = ini.allConfigSectionsText { };
};
test_one_empty_section =
{ expected = ''
[foo]
'';
expr = ini.allConfigSectionsText { foo = { }; };
};
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
test_one_section_one_item =
{ expected = ''
[foo]
bar = baz
'';
expr = ini.allConfigSectionsText { foo = { bar = "baz"; }; };
};
test_one_section_two_items =
{ expected = ''
[foo]
bar = baz
foobar = quux
'';
expr = ini.allConfigSectionsText { foo = { bar = "baz"; foobar = "quux"; }; };
};
test_two_sections =
{ expected = ''
[alpha]
beta = gamma
[foo]
bar = baz
foobar = quux
'';
expr = ini.allConfigSectionsText
{ foo = { bar = "baz"; foobar = "quux"; };
alpha = { beta = "gamma"; };
};
};
test_true =
{ expected = "x = true\n";
expr = ini.oneConfigItemText "x" true;
};
test_false =
{ expected = "x = false\n";
expr = ini.oneConfigItemText "x" false;
};
test_integer =
{ expected = "x = 12345\n";
expr = ini.oneConfigItemText "x" 12345;
};
test_dotted_key =
{ expected = "x.y = z\n";
expr = ini.oneConfigItemText "x.y" "z";
};