diff --git a/README.md b/README.md index 049f92b..ac42a67 100644 --- a/README.md +++ b/README.md @@ -70,13 +70,13 @@ library(testthat) date() ``` - ## [1] "Fri Aug 12 23:38:14 2016" + ## [1] "Fri Aug 12 23:58:20 2016" ``` r test_dir("tests/") ``` ## testthat results ======================================================================================================== - ## OK: 0 SKIPPED: 0 FAILED: 0 + ## OK: 1 SKIPPED: 0 FAILED: 0 ## ## DONE =================================================================================================================== diff --git a/tests/test-all.R b/tests/test-all.R index 44cbb72..10026b0 100644 --- a/tests/test-all.R +++ b/tests/test-all.R @@ -1,2 +1,2 @@ library(testthat) -test_check("filemagic") +test_check("wand") diff --git a/tests/testthat/test-wand.R b/tests/testthat/test-wand.R index ab6f62f..f4482d6 100644 --- a/tests/testthat/test-wand.R +++ b/tests/testthat/test-wand.R @@ -1,6 +1,11 @@ context("basic functionality") test_that("we can do something", { - #expect_that(some_function(), is_a("data.frame")) + tmp <- incant(list.files(system.file("img", package="wand"), full.names=TRUE), + magic_wand_file()) + tmp <- tmp$description + tmp <- unlist(tmp, use.names=FALSE) + + expect_that(tmp[2], equals("C source, ASCII text")) })