Skip to content

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

@jackfirth

Description

@jackfirth

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions