Exemplo 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)
Exemplo 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')
Exemplo n.º 3
0
 def test_should_read_empt_string_single_quotes(self):
     reader = StringReader('\'\'')
     expect(reader.read()).to_equal('\'\'')
Exemplo n.º 4
0
 def test_should_read_string_with_escaped_characters(self):
     reader = StringReader('"special string\\""')
     expect(reader.read()).to_equal('"special string\\""')
Exemplo 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"')
Exemplo n.º 6
0
 def test_should_read_partial_string(self):
     reader = StringReader('"partial string')
     expect(reader.read()).to_equal('"partial string')
Exemplo n.º 7
0
 def test_should_read_full_string_single(self):
     reader = StringReader('\'has token\'')
     expect(reader.read()).to_equal('\'has token\'')
Exemplo n.º 8
0
 def test_should_read_full_string(self):
     reader = StringReader('"has token"')
     expect(reader.read()).to_equal('"has token"')
Exemplo n.º 9
0
 def test_should_not_read_empty_string(self):
     reader = StringReader('')
     expect(reader.read()).to_equal(None)
Exemplo n.º 10
0
 def test_should_not_read_null(self):
     reader = StringReader(None)
     expect(reader.read()).to_equal(None)