Add 'EmptyStringTest.java' which shows problem with empty strings

This commit is contained in:
Paul Koerbitz 2014-06-30 18:29:04 +02:00
parent 9e075203e4
commit 14ec051e22

View 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"));
}
}