示例#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]]))