tests: add `src.ctf.fs` single field testing framework
[babeltrace.git] / tests / utils / utils.sh
index 18b5482362bac98e07e8bd7465c85e741873ee31..037f5307ae0006a82013df74bcd94f526ef232f4 100644 (file)
@@ -156,6 +156,10 @@ bt_remove_cr() {
        "$BT_TESTS_SED_BIN" -i'' -e 's/\r//g' "$1"
 }
 
+bt_remove_cr_inline() {
+       "$BT_TESTS_SED_BIN" 's/\r//g' "$1"
+}
+
 # Run the Babeltrace CLI, redirecting stdout and stderr to specified files.
 #
 #   $1: file to redirect stdout to
@@ -195,9 +199,7 @@ bt_diff() {
        # Strip any \r present due to Windows (\n -> \r\n).
        # "diff --string-trailing-cr" is not used since it is not present on
        # Solaris.
-       bt_remove_cr "$actual_file"
-
-       diff -u "$expected_file" "$actual_file" 1>&2
+       diff -u <(bt_remove_cr_inline "$expected_file") <(bt_remove_cr_inline "$actual_file") 1>&2
 
        return $?
 }
This page took 0.023361 seconds and 4 git commands to generate.