コード例 #1
0
ファイル: test_lex.py プロジェクト: milesrout/visp
 def test_empty_string(self):
     self.assertEqual(
         next(visp.lex('""')).type,
         'string')
     self.assertEqual(
         next(visp.lex('""')).string,
         '')
コード例 #2
0
ファイル: test_lex.py プロジェクト: milesrout/visp
 def test_lparen(self):
     self.assertEqual(
         next(visp.lex('(')).type,
         'lparen')
コード例 #3
0
ファイル: test_lex.py プロジェクト: milesrout/visp
 def test_quote(self):
     self.assertEqual(
         next(visp.lex('\'')).type,
         'quote')
コード例 #4
0
ファイル: test_lex.py プロジェクト: milesrout/visp
 def test_hashsym3(self):
     self.assertEqual(
         next(visp.lex('#hello')).type,
         'hashsym')
コード例 #5
0
ファイル: test_lex.py プロジェクト: milesrout/visp
 def test_hashsym1(self):
     self.assertEqual(
         next(visp.lex('#e')).type,
         'hashsym')
コード例 #6
0
ファイル: test_lex.py プロジェクト: milesrout/visp
 def test_symbol(self):
     self.assertEqual(
         next(visp.lex('foo%$!')).type,
         'symbol')
コード例 #7
0
ファイル: test_lex.py プロジェクト: milesrout/visp
 def test_number(self):
     self.assertEqual(
         next(visp.lex('12345')).type,
         'number')
コード例 #8
0
 def test_number(self):
     self.assertEqual(next(visp.lex('12345')).type, 'number')
コード例 #9
0
 def test_wspace(self):
     self.assertEqual(len(list(visp.lex('     '))), 0)
コード例 #10
0
 def test_lparen(self):
     self.assertEqual(next(visp.lex('(')).type, 'lparen')
コード例 #11
0
 def test_empty_string(self):
     self.assertEqual(next(visp.lex('""')).type, 'string')
     self.assertEqual(next(visp.lex('""')).string, '')
コード例 #12
0
 def test_quote(self):
     self.assertEqual(next(visp.lex('\'')).type, 'quote')
コード例 #13
0
 def test_hashsym3(self):
     self.assertEqual(next(visp.lex('#hello')).type, 'hashsym')
コード例 #14
0
 def test_hashsym1(self):
     self.assertEqual(next(visp.lex('#e')).type, 'hashsym')
コード例 #15
0
 def test_symbol(self):
     self.assertEqual(next(visp.lex('foo%$!')).type, 'symbol')
コード例 #16
0
ファイル: test_lex.py プロジェクト: milesrout/visp
 def test_dot(self):
     self.assertEqual(
         next(visp.lex('.')).type,
         'dot')
コード例 #17
0
ファイル: test_lex.py プロジェクト: milesrout/visp
 def test_wspace(self):
     self.assertEqual(
         len(list(visp.lex('     '))),
         0)
コード例 #18
0
 def test_dot(self):
     self.assertEqual(next(visp.lex('.')).type, 'dot')