def test_whitespaces(self): self.assertEqual({}, parse(" \n "))
def test_white_not_trim_in_quoted(self): self.assertEqual({"foo": "\nbar\n"}, parse('foo="\nbar\n"'))
def test_empty(self): self.assertEqual({}, parse(""))
def test_equal_char(self): self.assertEqual({"foo": "="}, parse("foo=="))
def test_equal_char_in_quote(self): self.assertEqual({"foo": "="}, parse("foo=\"=\""))
def test_whitetrim(self): self.assertEqual({"foo": "bar"}, parse(" foo = bar "))
def test_multiline(self): self.assertEqual( {"foo": "bar\nbaz\nfoobar"}, parse("foo=\"bar\nbaz\nfoobar\"") )
def test_more(self): self.assertEqual({"foo": "bar", "baar": "baz"}, parse("foo=bar\nbaar=baz"))
def test_lineskip(self): self.assertEqual({"foo": "bar", "bar": "baz"}, parse("foo=bar\n\nbar=baz"))
def test_escaped_quotes(self): self.assertEqual({"foo": "b\\\"ar"}, parse("foo=\"b\\\"ar\""))
def test_singleQuotes(self): self.assertEqual({"foo": "bar"}, parse("foo='bar'"))
def test_quotes(self): self.assertEqual({"foo": "bar"}, parse("foo=\"bar\""))
def test_simple2(self): self.assertEqual({"foo": "bar"}, parse("foo=bar"))
def test_simple(self): self.assertEqual({"a": "b"}, parse("a=b"))