Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(striprtf)
  > 
  > test_check("striprtf")
  1. Error: basic (@test-strip.R#11) ---------------------------------------------
  'x' cannot be coerced to class "hexmode"
  1: read_rtf("msword.rtf") at testthat/test-strip.R:11
  2: readLines(file, warn = FALSE, ...) %>% paste0(collapse = "\n") %>% strip_rtf(verbose)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: withVisible(function_list[[k]](value))
  9: function_list[[k]](value)
  10: strip_rtf(., verbose)
  11: strsplit(parsed$strcode, "x") %>% lapply(as.hexmode) %>% lapply(intToUtf8)
  12: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  13: eval(quote(`_fseq`(`_lhs`)), env, env)
  14: eval(quote(`_fseq`(`_lhs`)), env, env)
  15: `_fseq`(`_lhs`)
  16: freduce(value, `_function_list`)
  17: function_list[[i]](value)
  18: lapply(., as.hexmode)
  19: FUN(X[[i]], ...)
  20: stop("'x' cannot be coerced to class \"hexmode\"")
  
  2. Error: big (@test-strip.R#18) -----------------------------------------------
  'x' cannot be coerced to class "hexmode"
  1: read_rtf("big.rtf") at testthat/test-strip.R:18
  2: readLines(file, warn = FALSE, ...) %>% paste0(collapse = "\n") %>% strip_rtf(verbose)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: withVisible(function_list[[k]](value))
  9: function_list[[k]](value)
  10: strip_rtf(., verbose)
  11: strsplit(parsed$strcode, "x") %>% lapply(as.hexmode) %>% lapply(intToUtf8)
  12: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  13: eval(quote(`_fseq`(`_lhs`)), env, env)
  14: eval(quote(`_fseq`(`_lhs`)), env, env)
  15: `_fseq`(`_lhs`)
  16: freduce(value, `_function_list`)
  17: function_list[[i]](value)
  18: lapply(., as.hexmode)
  19: FUN(X[[i]], ...)
  20: stop("'x' cannot be coerced to class \"hexmode\"")
  
  3. Error: libre (@test-strip.R#25) ---------------------------------------------
  'x' cannot be coerced to class "hexmode"
  1: read_rtf("libre.rtf") at testthat/test-strip.R:25
  2: readLines(file, warn = FALSE, ...) %>% paste0(collapse = "\n") %>% strip_rtf(verbose)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: withVisible(function_list[[k]](value))
  9: function_list[[k]](value)
  10: strip_rtf(., verbose)
  11: strsplit(parsed$strcode, "x") %>% lapply(as.hexmode) %>% lapply(intToUtf8)
  12: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  13: eval(quote(`_fseq`(`_lhs`)), env, env)
  14: eval(quote(`_fseq`(`_lhs`)), env, env)
  15: `_fseq`(`_lhs`)
  16: freduce(value, `_function_list`)
  17: function_list[[i]](value)
  18: lapply(., as.hexmode)
  19: FUN(X[[i]], ...)
  20: stop("'x' cannot be coerced to class \"hexmode\"")
  
  4. Error: abiword (@test-strip.R#35) -------------------------------------------
  'x' cannot be coerced to class "hexmode"
  1: read_rtf("abiword.rtf") at testthat/test-strip.R:35
  2: readLines(file, warn = FALSE, ...) %>% paste0(collapse = "\n") %>% strip_rtf(verbose)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: withVisible(function_list[[k]](value))
  9: function_list[[k]](value)
  10: strip_rtf(., verbose)
  11: strsplit(parsed$strcode, "x") %>% lapply(as.hexmode) %>% lapply(intToUtf8)
  12: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  13: eval(quote(`_fseq`(`_lhs`)), env, env)
  14: eval(quote(`_fseq`(`_lhs`)), env, env)
  15: `_fseq`(`_lhs`)
  16: freduce(value, `_function_list`)
  17: function_list[[i]](value)
  18: lapply(., as.hexmode)
  19: FUN(X[[i]], ...)
  20: stop("'x' cannot be coerced to class \"hexmode\"")
  
  5. Error: Japanese (cp932) (@test-strip.R#45) ----------------------------------
  'x' cannot be coerced to class "hexmode"
  1: read_rtf("cp932.rtf") at testthat/test-strip.R:45
  2: readLines(file, warn = FALSE, ...) %>% paste0(collapse = "\n") %>% strip_rtf(verbose)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: withVisible(function_list[[k]](value))
  9: function_list[[k]](value)
  10: strip_rtf(., verbose)
  11: strsplit(parsed$strcode, "x") %>% lapply(as.hexmode) %>% lapply(intToUtf8)
  12: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  13: eval(quote(`_fseq`(`_lhs`)), env, env)
  14: eval(quote(`_fseq`(`_lhs`)), env, env)
  15: `_fseq`(`_lhs`)
  16: freduce(value, `_function_list`)
  17: function_list[[i]](value)
  18: lapply(., as.hexmode)
  19: FUN(X[[i]], ...)
  20: stop("'x' cannot be coerced to class \"hexmode\"")
  
  6. Error: Chinese and Korean (@test-strip.R#55) --------------------------------
  'x' cannot be coerced to class "hexmode"
  1: read_rtf("eastasia.rtf") at testthat/test-strip.R:55
  2: readLines(file, warn = FALSE, ...) %>% paste0(collapse = "\n") %>% strip_rtf(verbose)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: withVisible(function_list[[k]](value))
  9: function_list[[k]](value)
  10: strip_rtf(., verbose)
  11: strsplit(parsed$strcode, "x") %>% lapply(as.hexmode) %>% lapply(intToUtf8)
  12: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  13: eval(quote(`_fseq`(`_lhs`)), env, env)
  14: eval(quote(`_fseq`(`_lhs`)), env, env)
  15: `_fseq`(`_lhs`)
  16: freduce(value, `_function_list`)
  17: function_list[[i]](value)
  18: lapply(., as.hexmode)
  19: FUN(X[[i]], ...)
  20: stop("'x' cannot be coerced to class \"hexmode\"")
  
  7. Error: Europe (@test-strip.R#65) --------------------------------------------
  'x' cannot be coerced to class "hexmode"
  1: read_rtf("europe.rtf") at testthat/test-strip.R:65
  2: readLines(file, warn = FALSE, ...) %>% paste0(collapse = "\n") %>% strip_rtf(verbose)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: withVisible(function_list[[k]](value))
  9: function_list[[k]](value)
  10: strip_rtf(., verbose)
  11: strsplit(parsed$strcode, "x") %>% lapply(as.hexmode) %>% lapply(intToUtf8)
  12: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  13: eval(quote(`_fseq`(`_lhs`)), env, env)
  14: eval(quote(`_fseq`(`_lhs`)), env, env)
  15: `_fseq`(`_lhs`)
  16: freduce(value, `_function_list`)
  17: function_list[[i]](value)
  18: lapply(., as.hexmode)
  19: FUN(X[[i]], ...)
  20: stop("'x' cannot be coerced to class \"hexmode\"")
  
  testthat results ================================================================
  OK: 0 SKIPPED: 0 FAILED: 7
  1. Error: basic (@test-strip.R#11) 
  2. Error: big (@test-strip.R#18) 
  3. Error: libre (@test-strip.R#25) 
  4. Error: abiword (@test-strip.R#35) 
  5. Error: Japanese (cp932) (@test-strip.R#45) 
  6. Error: Chinese and Korean (@test-strip.R#55) 
  7. Error: Europe (@test-strip.R#65) 
  
  Error: testthat unit tests failed
  Execution halted