From dcb6bd682c20f26aab267fea83cf77918dcf5ab2 Mon Sep 17 00:00:00 2001 From: Brandon Bertelsen Date: Wed, 9 Sep 2020 19:02:10 -0500 Subject: [PATCH] Coverallllllllllllllls --- NEWS.md | 13 +++++++------ tests/testthat/test-codeBookItemTxtDescription.R | 8 ++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index 21134781..db27c8d4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,11 +1,12 @@ ## crunchtabs 1.2.9 -- Codebook question descriptions now appropriately escape special characters -- Added option enforce_onehundred which allows one to avoid rounding errors in totals rows -- Codebook table of contents overruns, cutting text and adding "..." -- Codebook generation now supports a filepath -- Added vertical space before append_text -- Bugfix: append_text that is multiple lines du0lpicated vertical space. Collapsing. +- Codebook question descriptions now appropriately escape special characters (#187) +- Added option enforce_onehundred which allows one to avoid rounding errors in totals rows (#189) +- Codebook table of contents overruns, cutting text and adding "..." (#186) +- Codebook generation now supports a filepath (#185) +- Added vertical space before append_text (#182) +- Bugfix: append_text that is multiple lines du0lpicated vertical space. Collapsing. (#191) +- Remove requirement for dev version of kableExtra (#184) ## crunchtabs 1.2.8 diff --git a/tests/testthat/test-codeBookItemTxtDescription.R b/tests/testthat/test-codeBookItemTxtDescription.R index dd1e4db9..d8b32ae3 100644 --- a/tests/testthat/test-codeBookItemTxtDescription.R +++ b/tests/testthat/test-codeBookItemTxtDescription.R @@ -51,4 +51,12 @@ with_api_fixture("fixtures-1-2-5", { ) }) + test_that("codebookItemTxtDescription notes", { + res = with_mock(codeBookItemTxtDescription(ds$q1), "crunch::notes" = function(x) "This is a note!") + expect_equal( + res, + "\\vskip 0.10in\nWhat is your favorite pet?\n\\addcontentsline{lot}{table}{\\parbox{1.8in}{\\ttfamily{q1}} Pet}\n\\vskip 0.10in\n\\emph{This is a note!}\n\\vskip 0.10in") + + }) + })