From 60972d3bc2fa830689bad271014c7d2f49957cd5 Mon Sep 17 00:00:00 2001 From: kartikeya Date: Fri, 29 Sep 2023 16:06:22 +0530 Subject: [PATCH] removing line_break parameter comments --- tests/testthat/test-utils.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index baa4266e..3fd23e62 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -52,17 +52,16 @@ testthat::test_that("padding_lst applies padding to a flextable based on indenta testthat::expect_is(padded_ft, "flextable") }) -line_break <- 5 -block_text <- paste(paste(rep("Line", line_break), seq_len(line_break)), collapse = "\n") +block_text <- paste(paste(rep("Line", 5), seq_len(5)), collapse = "\n") -testthat::test_that("split_text_block - n < line_break : splits text block into blocks no longer than n lines", { +testthat::test_that("split_text_block - splits text block into blocks no longer than n lines", { n <- 2 result <- split_text_block(block_text, n) result_lines <- lapply(result, function(x) strsplit(x, "\n")[[1]]) lapply(result_lines, function(x) testthat::expect_lte(length(x), n)) }) -test_that("split_text_block - n >= line_break: returns single block with original text", { +test_that("split_text_block - returns single block with original text", { n <- 7 result <- split_text_block(block_text, n) testthat::expect_equal(result, list(block_text))