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