예제 #1
0
 def test_whitespaces(self):
     self.assertEqual({}, parse("   \n   "))
예제 #2
0
 def test_white_not_trim_in_quoted(self):
     self.assertEqual({"foo": "\nbar\n"}, parse('foo="\nbar\n"'))
예제 #3
0
 def test_empty(self):
     self.assertEqual({}, parse(""))
예제 #4
0
 def test_equal_char(self):
     self.assertEqual({"foo": "="}, parse("foo=="))
예제 #5
0
 def test_equal_char_in_quote(self):
     self.assertEqual({"foo": "="}, parse("foo=\"=\""))
예제 #6
0
 def test_whitetrim(self):
     self.assertEqual({"foo": "bar"}, parse(" foo = bar "))
예제 #7
0
 def test_multiline(self):
     self.assertEqual(
         {"foo": "bar\nbaz\nfoobar"},
         parse("foo=\"bar\nbaz\nfoobar\"")
     )
예제 #8
0
 def test_more(self):
     self.assertEqual({"foo": "bar", "baar": "baz"}, parse("foo=bar\nbaar=baz"))
예제 #9
0
 def test_lineskip(self):
     self.assertEqual({"foo": "bar", "bar": "baz"}, parse("foo=bar\n\nbar=baz"))
예제 #10
0
 def test_escaped_quotes(self):
     self.assertEqual({"foo": "b\\\"ar"}, parse("foo=\"b\\\"ar\""))
예제 #11
0
 def test_singleQuotes(self):
     self.assertEqual({"foo": "bar"}, parse("foo='bar'"))
예제 #12
0
 def test_quotes(self):
     self.assertEqual({"foo": "bar"}, parse("foo=\"bar\""))
예제 #13
0
 def test_simple2(self):
     self.assertEqual({"foo": "bar"}, parse("foo=bar"))
예제 #14
0
 def test_simple(self):
     self.assertEqual({"a": "b"}, parse("a=b"))