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)
  
})
MangoTheCat/sasMap documentation built on Sept. 2, 2021, 9:41 p.m.