tests/testthat/test-summarise.R

context("summarise")

script <- system.file('examples/SAScode/Macros/fun2.SAS', package='sasMap')

test_that("Summarise SAS script", {
  
  expectedSummary <-
    structure(
      list(
        name = "fun2.SAS",
        lines = 12L,
        procs = "sql",
        datasteps = 0L,
        macroCalls = "util1",
        macroDefs = "fun2"
      ),
      .Names = c(
        "name",
        "lines",
        "procs",
        "datasteps",
        "macroCalls",
        "macroDefs"
      )
    )
  
  
  expect_equal(summariseSASScript(script), expectedSummary)
  
})

Try the sasMap package in your browser

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

sasMap documentation built on May 2, 2019, 6:42 a.m.