From 2589b5399c81253016302740894cf27d88837a5f Mon Sep 17 00:00:00 2001 From: boB Rudis Date: Sun, 4 Feb 2018 14:57:27 -0500 Subject: [PATCH] tests --- tests/testthat/test-cloc.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/testthat/test-cloc.R b/tests/testthat/test-cloc.R index ab6f62f..0033043 100644 --- a/tests/testthat/test-cloc.R +++ b/tests/testthat/test-cloc.R @@ -1,6 +1,11 @@ -context("basic functionality") -test_that("we can do something", { +context("cloc works") +test_that("core bits are functioning as expected", { - #expect_that(some_function(), is_a("data.frame")) + res <- cloc(system.file("extdata", "App.java", package="cloc")) + + expect_equal(res$file_count[1], 1) + expect_equal(res$loc[1], 8) + expect_equal(res$blank_lines[1], 1) + expect_equal(res$comment_lines[1], 4) })