diff --git a/tests/basic/test_main.py b/tests/basic/test_main.py index 0525fa8df..e4dc6b58e 100644 --- a/tests/basic/test_main.py +++ b/tests/basic/test_main.py @@ -396,3 +396,17 @@ class TestMain(TestCase): output=DummyOutput(), ) MockRepoMap.assert_called_once() + + def test_read_option(self): + with GitTemporaryDirectory(): + test_file = "test_file.txt" + Path(test_file).touch() + + coder = main( + ["--read", test_file, "--exit", "--yes"], + input=DummyInput(), + output=DummyOutput(), + return_coder=True, + ) + + self.assertIn(str(Path(test_file).resolve()), coder.abs_read_only_fnames)