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

Use the helper to simplify the test.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 0b1ea65f3a)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Peter Korsgaard
2026-06-18 14:48:00 +02:00
committed by Thomas Perale
parent 2f05b25d56
commit df353e4d2a

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$'")