Running 'issue-1.R' [155s]
  Running 'issue-2.R' [1s]
  Running 'issue-3.R' [145s]
  Running 'spec.R' [160s]
Running the tests in 'tests/issue-1.R' failed.
Complete output:
  > stopifnot(require(testthat))
  Loading required package: testthat
  > context("issue#1")
  > 
  > library(naturalsort)
  > 
  > test_that("Returns several NAs when argument is just one element", {
  +    text <- "a-10.png"
  +    expected <- "a-10.png"
  +    actual <- naturalsort(text)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 😸
  > 
  > proc.time()
     user  system elapsed 
     0.95    0.18    1.12 
Running the tests in 'tests/issue-3.R' failed.
Complete output:
  > stopifnot(require(testthat))
  Loading required package: testthat
  > context("issue#3")
  > 
  > library(naturalsort)
  > 
  > test_that("Produces an error when input is empty", {
  +    text <- character(0)
  +    expected <- character(0)
  +    actual <- naturalsort(text)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 🥳
  > 
  > proc.time()
     user  system elapsed 
     0.84    0.21    1.04 
Running the tests in 'tests/spec.R' failed.
Complete output:
  > stopifnot(require(testthat))
  Loading required package: testthat
  > context("specification")
  > 
  > library(naturalsort)
  > 
  > test_that("checks naturalorder(decreasing=FALSE, na.last=TRUE)", {
  +    text <- c("a1.png", "a2.png", "a10.png", NA, "a1-1.png")
  +    expected <- c(5L, 1L, 2L, 3L, 4L)
  +    actual <- naturalorder(text, decreasing=FALSE, na.last=TRUE)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 🎉
  > 
  > test_that("checks naturalorder(decreasing=TRUE, na.last=TRUE)", {
  +    text <- c("a1.png", "a2.png", "a10.png", NA, "a1-1.png")
  +    expected <- c(3L, 2L, 1L, 5L, 4L)
  +    actual <- naturalorder(text, decreasing=TRUE, na.last=TRUE)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 🥇
  > 
  > test_that("checks naturalorder(decreasing=FALSE, na.last=FALSE)", {
  +    text <- c("a1.png", "a2.png", "a10.png", NA, "a1-1.png")
  +    expected <- c(4L, 5L, 1L, 2L, 3L)
  +    actual <- naturalorder(text, decreasing=FALSE, na.last=FALSE)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 😸
  > 
  > test_that("checks naturalorder(decreasing=TRUE, na.last=FALSE)", {
  +    text <- c("a1.png", "a2.png", "a10.png", NA, "a1-1.png")
  +    expected <- c(4L, 3L, 2L, 1L, 5L)
  +    actual <- naturalorder(text, decreasing=TRUE, na.last=FALSE)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 🥇
  > 
  > test_that("checks naturalorder(decreasing=FALSE, na.last=NA)", {
  +    text <- c("a1.png", "a2.png", "a10.png", NA, "a1-1.png")
  +    expected <- c(5L, 1L, 2L, 3L)
  +    actual <- naturalorder(text, decreasing=FALSE, na.last=NA)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 😀
  > 
  > test_that("checks naturalorder(decreasing=TRUE, na.last=NA)", {
  +    text <- c("a1.png", "a2.png", "a10.png", NA, "a1-1.png")
  +    expected <- c(3L, 2L, 1L, 5L)
  +    actual <- naturalorder(text, decreasing=TRUE, na.last=NA)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 😀
  > 
  > test_that("naturalorder(decreasing=NA) throws an error", {
  +    expect_that(naturalorder(decreasing=NA), throws_error())
  + })
  Test passed 🌈
  > 
  > test_that("naturalorder for one-character-length vector", {
  +    text <- c("a", NA, "1")
  +    expected <- order(text)
  +    actual <- naturalorder(text)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 🥇
  > 
  > test_that("naturalorder is stable", {
  +    text <- c("01", "1", "001", "1", "01")
  +    expected <- c(3L, 1L, 5L, 2L, 4L)
  +    actual <- naturalorder(text)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 😀
  > 
  > test_that("checks naturalsort() with default parameters", {
  +    text <- c("a1.png", "a2.png", "a10.png", NA, "a1-1.png")
  +    expected <- c("a1-1.png", "a1.png", "a2.png", "a10.png")  # na.last=NA by default
  +    actual <- naturalsort(text)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 🥇
  > 
  > test_that("naturalfactor() without levels", {
  +    text <- c("a1.png", "a2.png", "a10.png")
  +    expected <- c("a1.png", "a2.png", "a10.png")
  +    f <- naturalfactor(text)
  +    actual <- levels(f)
  +    expect_that(actual, equals(expected))
  + })
  Test passed 🎊
  > 
  > test_that("naturalfactor() with levels", {
  +    text <- c("a1.png", "a2.png", "a10.png")
  +    levels <- c("a1.png", "a10.png")
  +    expected_factors <- c("a1.png", NA, "a10.png")
  +    f <- naturalfactor(text, levels = levels)
  +    expect_that(levels(f), equals(levels))
  +    expect_that(as.character(f), equals(expected_factors))
  + })
  Test passed 😀
  > 
  > proc.time()
     user  system elapsed 
     2.29    0.21    2.50