Running 'testthat.R' [1s/2s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(vietnamcode)
  > 
  > test_check("vietnamcode")
  -- ERROR (test-unicode-conversion.R:4:3): Converts Unicode to ASCII ------------
  Error: 'old' is longer than 'new'
  Backtrace:
      x
   1. +-testthat::expect_equal(convert_unicode_to_ascii("À"), "A") test-unicode-conversion.R:4:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-vietnamcode:::convert_unicode_to_ascii("À")
   5.   \-base::chartr(old, new, string)
  
  -- ERROR (test-vietnamcode.R:4:3): Edge case for number of strings -------------
  Error: 'old' is longer than 'new'
  Backtrace:
      x
   1. +-testthat::expect_equal(...) test-vietnamcode.R:4:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-vietnamcode::vietnamcode(...)
   5.   +-base::tolower(convert_unicode_to_ascii(sourcevar))
   6.   \-vietnamcode:::convert_unicode_to_ascii(sourcevar)
   7.     \-base::chartr(old, new, string)
  
  -- ERROR (test-vietnamcode.R:9:3): Returns non-match as NA ---------------------
  Error: 'old' is longer than 'new'
  Backtrace:
      x
   1. +-testthat::expect_equal(...) test-vietnamcode.R:9:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-vietnamcode::vietnamcode(c(""), "province_name", "pci")
   5.   +-base::tolower(convert_unicode_to_ascii(sourcevar))
   6.   \-vietnamcode:::convert_unicode_to_ascii(sourcevar)
   7.     \-base::chartr(old, new, string)
  
  -- ERROR (test-vietnamcode.R:21:3): Handles province name with diacritics ------
  Error: 'old' is longer than 'new'
  Backtrace:
      x
   1. +-testthat::expect_equal(...) test-vietnamcode.R:21:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-vietnamcode::vietnamcode(...)
   5.   +-base::tolower(convert_unicode_to_ascii(sourcevar))
   6.   \-vietnamcode:::convert_unicode_to_ascii(sourcevar)
   7.     \-base::chartr(old, new, string)
  
  -- ERROR (test-vietnamcode.R:28:3): Handles lower / upper case -----------------
  Error: 'old' is longer than 'new'
  Backtrace:
      x
   1. +-testthat::expect_equal(...) test-vietnamcode.R:28:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-vietnamcode::vietnamcode(c("hA nOI"), "province_name", "province_name")
   5.   +-base::tolower(convert_unicode_to_ascii(sourcevar))
   6.   \-vietnamcode:::convert_unicode_to_ascii(sourcevar)
   7.     \-base::chartr(old, new, string)
  
  -- ERROR (test-vietnamcode.R:33:3): Search province name using regex -----------
  Error: 'old' is longer than 'new'
  Backtrace:
      x
   1. +-testthat::expect_equal(...) test-vietnamcode.R:33:2
   2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
   3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
   4. \-vietnamcode::vietnamcode(...)
   5.   +-base::tolower(convert_unicode_to_ascii(sourcevar))
   6.   \-vietnamcode:::convert_unicode_to_ascii(sourcevar)
   7.     \-base::chartr(old, new, string)
  
  == testthat results  ===========================================================
  ERROR (test-unicode-conversion.R:4:3): Converts Unicode to ASCII
  ERROR (test-vietnamcode.R:4:3): Edge case for number of strings
  ERROR (test-vietnamcode.R:9:3): Returns non-match as NA
  ERROR (test-vietnamcode.R:21:3): Handles province name with diacritics
  ERROR (test-vietnamcode.R:28:3): Handles lower / upper case
  ERROR (test-vietnamcode.R:33:3): Search province name using regex
  
  [ FAIL 6 | WARN 0 | SKIP 0 | PASS 3 ]
  Error: Test failures
  Execution halted