inst/tinytest/test_select_stacking.R

test_select_stacking <- function() {

  ops1 <- table_source('d', c('a', 'b', 'c')) %.>% select_columns(., c('a', 'b')) %.>% select_columns(., c('b'))
  ops1_str <- format(ops1)
  expect_equal(length(gregexpr('select_columns', ops1_str, fixed = TRUE)[[1]]), 1)

  ops2 <- table_source('d', c('a', 'b', 'c')) %.>% select_columns(., c('a', 'b')) %.>% select_columns(., c('b', 'a'))
  ops2_str <- format(ops2)
  expect_equal(length(gregexpr('select_columns', ops2_str, fixed = TRUE)[[1]]), 1)

  invisible(NULL)
}

test_select_stacking()

Try the rquery package in your browser

Any scripts or data that you put into this service are public.

rquery documentation built on Aug. 20, 2023, 9:06 a.m.