예제 #1
0
파일: test_c.py 프로젝트: johntyree/mem
    def test(self):
        def build():
            prog("hello", objs = [obj(["main.c", "hello.c"])])

        mem.do_build(self.root, build)

        self.assert_all_files_exist()
예제 #2
0
    def test(self):
        def build():
            pdflatex("simple.tex")

        mem.do_build(self.root, build)

        self.assert_all_files_exist()
예제 #3
0
파일: test_c.py 프로젝트: johntyree/mem
    def test(self):
        def build():
            obj(["hello.c", 'main.c'])

        mem.do_build(self.root, build)

        self.assert_all_files_exist()
예제 #4
0
    def test(self):
        def build():
            pdflatex("simple.tex")

        mem.do_build(self.root, build)
        mem.Mem.destroy()

        self.assert_all_files_exist()
        h = FileHash("simple.pdf")
        os.unlink("simple.pdf")

        # TODO: ensure here that the file is restored and not rebuild
        # Currently, I have no idea how this could be done
        mem.do_build(self.root, build)
        self.assert_all_files_exist()

        ok_(not h.changed)
예제 #5
0
    def test(self):
        def build():
            pdflatex("simple_c.tex")

        shutil.copy("simple.tex", "simple_c.tex")

        mem.do_build(self.root, build)
        mem.Mem.destroy()

        self.assert_all_files_exist()
        h = FileHash("simple_c.pdf")

        shutil.copy("simple1.tex", "simple_c.tex")

        # TODO: ensure the file is rebuild, not restored
        mem.do_build(self.root, build)
        self.assert_all_files_exist()

        ok_(h.changed)