import unittest
from support import GNATCOLL_TestCase, chdir, pathsep
import os.path


class Test(GNATCOLL_TestCase):
    @chdir("win")
    def test_windows(self):
        self.gprbuild()
        self.runexec([os.path.join("obj","test_win"), "unix.txt"],
                     "test.out", msg="File in Unix format")
        file("win.txt", "wb").write(
            file("unix.txt").read().replace("\n", "\r\n"))
        self.runexec([os.path.join("obj","test_win"), "win.txt"],
                     "test.out", msg="File in Windows format")
