jorgenschaefer / emacs-buttercup

Behavior-Driven Emacs Lisp Testing
GNU General Public License v3.0
362 stars 44 forks source link

New failures with native-compilation on emacs-next-minimal-30.0.50-1.9d27b95 #238

Closed nicolas-graves closed 11 months ago

nicolas-graves commented 1 year ago
`pretty' should pretty-print frames  Expected `(buttercup-output)' with value "========================================
suite bc-bt-backtrace

Traceback (most recent call last):
λ (bc-bt-foo
   \"a string that will be truncated in backtrace crop, at least 70 chars long\")
λ (bc-bt-bar
   \"a string that will be truncated in backtrace crop, at least 70 chars long\")
λ (bc-bt-baz
   \"a string that will be truncated in backtrace crop, at least 70 chars long\")
M (or (number-or-marker-p a)
      (signal 'wrong-type-argument (list 'number-or-marker-p a)))
λ (signal wrong-type-argument
        (number-or-marker-p
         \"a string that will be truncated in backtrace crop, at least 70 chars long\"))
error: (wrong-type-argument number-or-marker-p \"a string that will be truncated in backtrace crop, at least 70 chars long\")

" to match the regexp "\\(?:\\`=\\{40\\}
suite bc-bt-backtrace

Traceback (most recent call last):
λ (bc-bt-foo \"\\(?:a string that will be truncated in backtrace crop, at least 70 chars long\\)\")
λ (bc-bt-bar \"\\(?:a string that will be truncated in backtrace crop, at least 70 chars long\\)\")
λ (bc-bt-baz \"\\(?:a string that will be truncated in backtrace crop, at least 70 chars long\\)\")
\\(?:[Mλ] (.*\\(?:
   .*\\)*?.*)
\\)*error: ([^z-a]*)

\\'\\)", but instead it was "========================================
suite bc-bt-backtrace

Traceback (most recent call last):
λ (bc-bt-foo
   \"a string that will be truncated in backtrace crop, at least 70 chars long\")
λ (bc-bt-bar
   \"a string that will be truncated in backtrace crop, at least 70 chars long\")
λ (bc-bt-baz
   \"a string that will be truncated in backtrace crop, at least 70 chars long\")
M (or (number-or-marker-p a)
      (signal 'wrong-type-argument (list 'number-or-marker-p a)))
λ (signal wrong-type-argument
        (number-or-marker-p
         \"a string that will be truncated in backtrace crop, at least 70 chars long\"))
error: (wrong-type-argument number-or-marker-p \"a string that will be truncated in backtrace crop, at least 70 chars long\")

"

I don't see any difference by eye or with ediff. Maybe this has something to do with regexp or native compilation?

mekeor commented 1 year ago

I think it's because the regexp-pattern

λ (bc-bt-foo "\(?:a string that will be truncated in backtrace crop, at least 70 chars long\)")

does not match

λ (bc-bt-foo
   "a string that will be truncated in backtrace crop, at least 70 chars long")

because of the newline.

snogge commented 11 months ago

Fixed in dfef8cf9c8404567c247b292a4c5752b47e2e4ec. Don't know why I did not see your bug report or PR at the time. Must check my notification settings again.