Exemplo n.º 1
0
 def test_empty_string(self):
     self.assertEqual(
         next(visp.lex('""')).type,
         'string')
     self.assertEqual(
         next(visp.lex('""')).string,
         '')
Exemplo n.º 2
0
 def test_lparen(self):
     self.assertEqual(
         next(visp.lex('(')).type,
         'lparen')
Exemplo n.º 3
0
 def test_quote(self):
     self.assertEqual(
         next(visp.lex('\'')).type,
         'quote')
Exemplo n.º 4
0
 def test_hashsym3(self):
     self.assertEqual(
         next(visp.lex('#hello')).type,
         'hashsym')
Exemplo n.º 5
0
 def test_hashsym1(self):
     self.assertEqual(
         next(visp.lex('#e')).type,
         'hashsym')
Exemplo n.º 6
0
 def test_symbol(self):
     self.assertEqual(
         next(visp.lex('foo%$!')).type,
         'symbol')
Exemplo n.º 7
0
 def test_number(self):
     self.assertEqual(
         next(visp.lex('12345')).type,
         'number')
Exemplo n.º 8
0
 def test_number(self):
     self.assertEqual(next(visp.lex('12345')).type, 'number')
Exemplo n.º 9
0
 def test_wspace(self):
     self.assertEqual(len(list(visp.lex('     '))), 0)
Exemplo n.º 10
0
 def test_lparen(self):
     self.assertEqual(next(visp.lex('(')).type, 'lparen')
Exemplo n.º 11
0
 def test_empty_string(self):
     self.assertEqual(next(visp.lex('""')).type, 'string')
     self.assertEqual(next(visp.lex('""')).string, '')
Exemplo n.º 12
0
 def test_quote(self):
     self.assertEqual(next(visp.lex('\'')).type, 'quote')
Exemplo n.º 13
0
 def test_hashsym3(self):
     self.assertEqual(next(visp.lex('#hello')).type, 'hashsym')
Exemplo n.º 14
0
 def test_hashsym1(self):
     self.assertEqual(next(visp.lex('#e')).type, 'hashsym')
Exemplo n.º 15
0
 def test_symbol(self):
     self.assertEqual(next(visp.lex('foo%$!')).type, 'symbol')
Exemplo n.º 16
0
 def test_dot(self):
     self.assertEqual(
         next(visp.lex('.')).type,
         'dot')
Exemplo n.º 17
0
 def test_wspace(self):
     self.assertEqual(
         len(list(visp.lex('     '))),
         0)
Exemplo n.º 18
0
 def test_dot(self):
     self.assertEqual(next(visp.lex('.')).type, 'dot')