From 7f49449a989ab744aaa968c1f990c021e82ed5c2 Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Tue, 10 Dec 2019 10:22:20 +1300 Subject: [PATCH] Test utils: further clean up our test output (#2178). --- src/tests/src/testsutils.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/tests/src/testsutils.cpp b/src/tests/src/testsutils.cpp index 9e5b7c34b0..97ccafdea8 100644 --- a/src/tests/src/testsutils.cpp +++ b/src/tests/src/testsutils.cpp @@ -162,7 +162,15 @@ int runCli(const QStringList &pArguments, QStringList &pOutput) QDir::setCurrent(origPath); #endif - pOutput = output.remove(dirName()).remove('\r').split('\n'); + // Clean up our output by: + // - Making any path relative rather than absolute; + // - Replacing backslashes with forward slashes; and + // - Removing all occurrences of the CR character. + + pOutput = output.remove(dirName()) + .replace('\\', '/') + .remove('\r') + .split('\n'); return process.exitCode(); }