Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line string-info isn't indented correctly #180

Open
jackfirth opened this issue Aug 22, 2024 · 0 comments
Open

Multi-line string-info isn't indented correctly #180

jackfirth opened this issue Aug 22, 2024 · 0 comments
Labels

Comments

@jackfirth
Copy link
Collaborator

jackfirth commented Aug 22, 2024

This program:

#lang racket/base

(require rackunit)

(with-check-info (['multiline-string (string-info "hello\nworld")])
  (check-equal? 1 2))

Produces this failure message:

--------------------
FAILURE
multiline-string:
  hello
world
name:              check-equal?
location:          3-unsaved-editor:6:2
actual:            1
expected:          2
--------------------

But it should produce this:

--------------------
FAILURE
multiline-string:
  hello
  world
name:              check-equal?
location:          3-unsaved-editor:6:2
actual:            1
expected:          2
--------------------

Note the difference in indentation in the world line of text. Rackunit used to do this, and I relied on it for good error messages in my tests of Resyntax since those tests use string-info to embed the source code blocks in the test failure messages whenever Resyntax fails to fix code correctly. I'm not sure when this stopped working, but it worked in 2021 when I first made Resyntax.

@jackfirth jackfirth added the bug label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant