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

expect_snapshot() fails when names contain backquotes #1780

Open
moodymudskipper opened this issue May 2, 2023 · 1 comment
Open

expect_snapshot() fails when names contain backquotes #1780

moodymudskipper opened this issue May 2, 2023 · 1 comment
Labels
bug an unexpected problem or unintended behavior snapshot 📷

Comments

@moodymudskipper
Copy link

When running such test:

test_that("backquotes", {
  expect_snapshot(
    c("`a`" = 1)
  )
})

I get :

`c(`\`a\`` = 2)` threw an unexpected error.
Message: attempt to use zero-length variable name
Class:   simpleError/error/condition
@hadley
Copy link
Member

hadley commented Jul 26, 2023

This looks like an rlang bug: r-lib/rlang#1642

However maybe we should just use deparse() instead of expr_deparse().

@hadley hadley added bug an unexpected problem or unintended behavior snapshot 📷 labels Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior snapshot 📷
Projects
None yet
Development

No branches or pull requests

2 participants