Beispiel #1
0
    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)
Beispiel #2
0
 def test_parseinstr_comments(self):
     comment_examples = ["# hi there","    # more comments" "", "#", "   "]
     self.assertEqual(parseinstr(comment_examples), ([], []))
Beispiel #3
0
 def test_parseinstr_shortmaps(self):
     test = ["zomg.wad\n","0 31 0\n"]
     self.assertEqual(parseinstr(test), (["zomg.wad","0 31 0"],[]))
Beispiel #4
0
 def test_parseinstr_allgood(self):
     test = ["zomg.wad\n","0 0 31 0\n"]
     self.assertEqual(parseinstr(test), (["zomg.wad"],[[0,0,31,0]]))