Skip to content

Commit cde6d76

Browse files
tests: use a more stable diff format
* This test was making assumptions about terminal width. * It would also appear `diff` can write trailing spaces in some cases. * Switch to using a more stable output format.
1 parent 4c8f4f9 commit cde6d76

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

t/rose-config-diff/00-basic.t

+21-19
Original file line numberDiff line numberDiff line change
@@ -338,28 +338,30 @@ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
338338
TEST_KEY=$TEST_KEY_BASE-custom-diff-tool-config-graphical
339339
cat >conf/rose.conf <<__ROSE_CONF__
340340
[external]
341-
gdiff_tool=diff -y
341+
gdiff_tool=diff --unified --label=a --label=b
342342
__ROSE_CONF__
343343
run_fail "$TEST_KEY" rose config-diff -g $TEST_DIR/app{1,2}/rose-app.conf
344-
# Note: two column layout assumes 8 space tabs.
345344
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<'__DIFF__'
346-
# description=Environment variable configuration # description=Environment variable configuration
347-
[env] [env]
348-
# description=The number of gears available. <
349-
# title=Gearbox Gears <
350-
# 1 reverse, 5 forward <
351-
GEARBOX_GEARS=6 <
352-
# help=1 3 5 <
353-
# =| | | <
354-
# =------- <
355-
# =| | | <
356-
# =2 4 R <
357-
GEARSTICK_DECORATION=golfball GEARSTICK_DECORATION=golfball
358-
>
359-
> # description=Different choices of locking methods, if availa
360-
> [namelist:locking]
361-
> # title=Air Locking?
362-
> air_locking=.false.
345+
--- a
346+
+++ b
347+
@@ -1,12 +1,8 @@
348+
# description=Environment variable configuration
349+
[env]
350+
-# description=The number of gears available.
351+
-# title=Gearbox Gears
352+
-# 1 reverse, 5 forward
353+
-GEARBOX_GEARS=6
354+
-# help=1 3 5
355+
-# =| | |
356+
-# =-------
357+
-# =| | |
358+
-# =2 4 R
359+
GEARSTICK_DECORATION=golfball
360+
+
361+
+# description=Different choices of locking methods, if available.
362+
+[namelist:locking]
363+
+# title=Air Locking?
364+
+air_locking=.false.
363365
__DIFF__
364366
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
365367
#-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)