support/testing: test_dos2unix.py: use assertRunNotOk()

Use the helper to simplify the test.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Peter Korsgaard
2026-06-18 14:48:00 +02:00
parent d7284778a1
commit 0b1ea65f3a

View File

@@ -32,8 +32,7 @@ class TestDos2Unix(infra.basetest.BRTest):
self.assertRunOk("unix2dos -n original.txt dos.txt")
# DOS file is expected to be different than the UNIX file
_, exit_code = self.emulator.run("cmp original.txt dos.txt")
self.assertNotEqual(exit_code, 0)
self.assertRunNotOk("cmp original.txt dos.txt")
# The "cat -A" command should print '^M$' for CR-LF
self.assertRunOk("cat -A dos.txt | grep -Fq '^M$'")