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

Inspect may make the test driver crash #819

Closed
CAIMEOX opened this issue Aug 7, 2024 · 1 comment · Fixed by #858
Closed

Inspect may make the test driver crash #819

CAIMEOX opened this issue Aug 7, 2024 · 1 comment · Fixed by #858
Labels
good first issue Good for newcomers

Comments

@CAIMEOX
Copy link
Collaborator

CAIMEOX commented Aug 7, 2024

The following code will break the test driver

test "inspect" {
  inspect!("\x00")
}

which outputs:

failed: parse expect test result failed: {"loc": "/Users/caimeo/code/quickcheck/qc/qc_demo.mbt:209:3-209:19", "args_loc": "[\"/Users/caimeo/code/quickcheck/qc/qc_demo.mbt:209:12-209:18\", null, null, null]", "expect": "", "actual": "\x00"}

Caused by:
    invalid escape at line 1 column 194
@lijunchen
Copy link
Contributor

This is because {"actual": "\x00"} is not a valid JSON. We need to fix "\x00".escape() or add a new escape method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants