We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Such as var1 <- var2 <- 2
var1 <- var2 <- 2
pkgload::load_all("../teal.code") #> ℹ Loading teal.code code <- "var1 <- var2 <- 1" td <- eval_code(qenv(), code) get_code(td, names = "var1") #> [1] "var1 <- var2 <- 1" get_code(td, names = "var2") #> Warning: Object(s) not found in code: var2. #> [1] ""
Created on 2025-04-30 with reprex v2.1.1
See test suite below for test-driven development
testthat::describe("detects multiple assignments in single line", { testthat::it("<-", { # testthat::skip("Not implemented") code <- "var1 <- var2 <- 1" td <- eval_code(qenv(), code) testthat::expect_identical(get_code(td, names = "var1"), code) testthat::expect_identical(get_code(td, names = "var2"), code) }) testthat::it("->", { code <- "1 -> var1 -> var2" td <- eval_code(qenv(), code) testthat::expect_identical( get_code(td, names = "var1"), as.character(parse(text = code, keep.source = TRUE)) ) testthat::expect_identical(get_code(td, names = "var1"), code) testthat::expect_identical(get_code(td, names = "var2"), code) }) testthat::it("<- and ->", { code <- "var1 <- 1 -> var2" td <- eval_code(qenv(), code) testthat::expect_identical(get_code(td, names = "var1"), code) testthat::expect_identical(get_code(td, names = "var2"), code) }) })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Feature description
Such as
var1 <- var2 <- 2
Created on 2025-04-30 with reprex v2.1.1
See test suite below for test-driven development
Code of Conduct
Contribution Guidelines
Security Policy
The text was updated successfully, but these errors were encountered: