MCPcopy Index your code
hub / github.com/geekcomputers/Python / test_combines_options

Method test_combines_options

Cat/test_cat.py:130–139  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

128 self.assertEqual(result.stdout, "Alpha$\nBeta$")
129
130 def test_combines_options(self):
131 with tempfile.TemporaryDirectory() as temp_dir:
132 file_path = Path(temp_dir) / "lines.txt"
133 file_path.write_text("Alpha\n\n\nBeta\n", encoding="utf-8")
134
135 result = self.run_cat("-b", "-s", "-E", file_path)
136
137 expected = " 1\tAlpha$\n$\n 2\tBeta$\n"
138 self.assertEqual(result.returncode, 0)
139 self.assertEqual(result.stdout, expected)
140
141
142if __name__ == "__main__":

Callers

nothing calls this directly

Calls 1

run_catMethod · 0.95

Tested by

no test coverage detected