コード例 #1
0
ファイル: test.py プロジェクト: jmtd/inkfoundry
    def test_parseinstr_mixedmaps(self):
        """Test an input file which mixes the input files and mapping
           declarations (which is not permitted)"""

        test = "zomg.wad\n0 0 31 0\nfoo.wad".split("\n")
        with self.assertRaises(Exception):
            parseinstr(test)
コード例 #2
0
ファイル: test.py プロジェクト: jmtd/inkfoundry
 def test_parseinstr_comments(self):
     comment_examples = ["# hi there","    # more comments" "", "#", "   "]
     self.assertEqual(parseinstr(comment_examples), ([], []))
コード例 #3
0
ファイル: test.py プロジェクト: jmtd/inkfoundry
 def test_parseinstr_shortmaps(self):
     test = ["zomg.wad\n","0 31 0\n"]
     self.assertEqual(parseinstr(test), (["zomg.wad","0 31 0"],[]))
コード例 #4
0
ファイル: test.py プロジェクト: jmtd/inkfoundry
 def test_parseinstr_allgood(self):
     test = ["zomg.wad\n","0 0 31 0\n"]
     self.assertEqual(parseinstr(test), (["zomg.wad"],[[0,0,31,0]]))