mirror of
https://github.com/plexusorg/toml4j.git
synced 2024-12-29 11:42:15 +00:00
Test that key name cannot start with [
This commit is contained in:
parent
714fb81330
commit
5ed9a4155e
1 changed files with 5 additions and 0 deletions
|
@ -197,6 +197,11 @@ public class TomlTest {
|
||||||
public void should_fail_on_key_name_with_hash() throws Exception {
|
public void should_fail_on_key_name_with_hash() throws Exception {
|
||||||
new Toml().parse("a# = 1");
|
new Toml().parse("a# = 1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(expected = IllegalStateException.class)
|
||||||
|
public void should_fail_on_key_name_starting_with_square_bracket() throws Exception {
|
||||||
|
new Toml().parse("[a = 1");
|
||||||
|
}
|
||||||
|
|
||||||
@Test(expected = IllegalStateException.class)
|
@Test(expected = IllegalStateException.class)
|
||||||
public void should_fail_when_key_is_overwritten_by_table() {
|
public void should_fail_when_key_is_overwritten_by_table() {
|
||||||
|
|
Loading…
Reference in a new issue