mirror of
https://github.com/plexusorg/toml4j.git
synced 2024-10-31 17:29:14 +00:00
Add 'EmptyStringTest.java' which shows problem with empty strings
This commit is contained in:
parent
9e075203e4
commit
14ec051e22
15
src/test/java/com/moandjiezana/toml/EmptyStringTest.java
Normal file
15
src/test/java/com/moandjiezana/toml/EmptyStringTest.java
Normal file
|
@ -0,0 +1,15 @@
|
|||
package com.moandjiezana.toml;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class EmptyStringTest {
|
||||
@Test
|
||||
public void should_parse_multiple_sections() {
|
||||
Toml toml = new Toml().parse("str1 = \"\"\nstr2 = \"Hello, world!\"");
|
||||
assertEquals("", toml.getString("str1"));
|
||||
assertEquals("Hello, world!", toml.getString("str2"));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue