Esempio n. 1
0
 def test_should_not_read_value_not_starting_with_string_character(self):
     reader = StringReader('blah "stuff"')
     expect(reader.read()).to_equal(None)
Esempio n. 2
0
 def test_should_read_string_terminated_by_new_line(self):
     reader = StringReader('"this has a\nnew line"')
     expect(reader.read()).to_equal('"this has a')
Esempio n. 3
0
 def test_should_read_empt_string_single_quotes(self):
     reader = StringReader('\'\'')
     expect(reader.read()).to_equal('\'\'')
Esempio n. 4
0
 def test_should_read_string_with_escaped_characters(self):
     reader = StringReader('"special string\\""')
     expect(reader.read()).to_equal('"special string\\""')
Esempio n. 5
0
 def test_should_read_string_with_nested_characters(self):
     reader = StringReader('"the people\'s string"')
     expect(reader.read()).to_equal('"the people\'s string"')
Esempio n. 6
0
 def test_should_read_partial_string(self):
     reader = StringReader('"partial string')
     expect(reader.read()).to_equal('"partial string')
Esempio n. 7
0
 def test_should_read_full_string_single(self):
     reader = StringReader('\'has token\'')
     expect(reader.read()).to_equal('\'has token\'')
Esempio n. 8
0
 def test_should_read_full_string(self):
     reader = StringReader('"has token"')
     expect(reader.read()).to_equal('"has token"')
Esempio n. 9
0
 def test_should_not_read_empty_string(self):
     reader = StringReader('')
     expect(reader.read()).to_equal(None)
Esempio n. 10
0
 def test_should_not_read_null(self):
     reader = StringReader(None)
     expect(reader.read()).to_equal(None)