File tree Expand file tree Collapse file tree 1 file changed +20
-13
lines changed Expand file tree Collapse file tree 1 file changed +20
-13
lines changed Original file line number Diff line number Diff line change 96
96
(let _lhs_align (len _lhs_repr))
97
97
(let _rhs_align (len _rhs_repr))
98
98
(let _show_expected (!= _lhs_repr (toString _lhs)))
99
-
100
- (append! _failures
101
- (str:format
102
- (+ "{}{: <" (toString (len "expected ")) "}" "{: <" (toString _rhs_start) "}{:~<" (toString _rhs_align) "} {}")
103
- _indent
104
- # to position one char before the first ' surrounding the expected value
105
- ""
106
- # writes the | right under the first ' surrounding the expected value
107
- (if _show_expected "|" "")
108
- # begins the \~~~~ under the real value
109
- "\\"
110
- _rhs))
99
+ (let _show_real (!= _rhs_repr (toString _rhs)))
100
+
101
+ (if _show_real
102
+ (append! _failures
103
+ (str:format
104
+ (+ "{}{: <" (toString (len "expected ")) "}" "{: <" (toString _rhs_start) "}{:~<" (toString _rhs_align) "} {}")
105
+ _indent
106
+ # to position one char before the first ' surrounding the expected value
107
+ ""
108
+ # writes the | right under the first ' surrounding the expected value
109
+ (if _show_expected "|" "")
110
+ # begins the \~~~~ under the real value
111
+ (if _show_real "\\" "")
112
+ (if _show_real _rhs ""))))
111
113
(if _show_expected
112
- (append! _failures (str:format (+ "{}{: <9}{:~<" (toString _lhs_align) "} {}") _indent "" "\\" _lhs)))}))
114
+ (append! _failures
115
+ (str:format
116
+ (+ "{}{: <" (toString (len "expected ")) "}\\ {}")
117
+ _indent
118
+ ""
119
+ _lhs)))}))
113
120
114
121
# internal, do not use
115
122
# This can only be used within a (nested or not) call to test:suite
You can’t perform that action at this time.
0 commit comments