Running ‘AESTest.R’
  Comparing ‘AESTest.Rout’ to ‘AESTest.Rout.save’ ... OK
  Running ‘digestTest.R’
  Comparing ‘digestTest.Rout’ to ‘digestTest.Rout.save’ ... OK
  Running ‘hmacTest.R’
  Comparing ‘hmacTest.Rout’ to ‘hmacTest.Rout.save’ ... OK
  Running ‘load-unload.R’
  Running ‘num2hexTest.R’
  Running ‘sha1Test.R’
Running the tests in ‘tests/sha1Test.R’ failed.
Complete output:
  > 
  > ## tests for digest, taken from the examples in the manual page
  > 
  > stopifnot(require(digest))
  Loading required package: digest
  > 
  > # calculate sha1 fingerprints
  > x.numeric <- seq(0, 1, length = 4 ^ 3)
  > x.list <- list(letters, x.numeric)
  > x.dataframe <- data.frame(
  +     X = letters,
  +     Y = x.numeric[2],
  +     Z = factor(letters),
  +     stringsAsFactors = FALSE
  + )
  > x.matrix.num <- as.matrix(x.numeric)
  > x.matrix.letter <- as.matrix(letters)
  > x.dataframe.round <- x.dataframe
  > x.dataframe.round$Y <- signif(x.dataframe.round$Y, 14)
  > x.factor <- factor(letters)
  > x.array.num <- as.array(x.numeric)
  > 
  > # tests using detailed numbers
  > stopifnot(
  +     !identical(x.numeric, signif(x.numeric, 14))
  + )
  > stopifnot(
  +     !identical(x.matrix.num, signif(x.matrix.num, 14))
  + )
  > # returns the correct SHA1
  > stopifnot(
  +     identical(
  +         sha1(x.numeric),
  +         {
  +             z <- digest:::num2hex(x.numeric)
  +             attr(z, "digest::sha1") <- list(
  +                 class = class(x.numeric),
  +                 digits = 14L,
  +                 zapsmall = 7L
  +             )
  +             digest(z, algo = "sha1")
  +         }
  +     )
  + )
  > stopifnot(
  +     identical(
  +         sha1(letters),
  +         {
  +             z <- letters
  +             attr(z, "digest::sha1") <- list(
  +                 class = "character",
  +                 digits = 14L,
  +                 zapsmall = 7L
  +             )
  +             digest(z, algo = "sha1")
  +         }
  +     )
  + )
  > stopifnot(
  +     identical(
  +         sha1(x.list),
  +         {
  +             z <- sapply(x.list, sha1)
  +             attr(z, "digest::sha1") <- list(
  +                 class = "list",
  +                 digits = 14L,
  +                 zapsmall = 7L
  +             )
  +             digest(z, algo = "sha1")
  +         }
  +     )
  + )
  > stopifnot(
  +     identical(
  +         sha1(x.dataframe),
  +         {
  +             z <- sapply(x.dataframe, sha1)
  +             attr(z, "digest::sha1") <- list(
  +                 class = "data.frame",
  +                 digits = 14L,
  +                 zapsmall = 7L
  +             )
  +             digest(z, algo = "sha1")
  +         }
  +     )
  + )
  > stopifnot(
  +     identical(
  +         sha1(x.matrix.num),
  +         {
  +             z <- matrix(
  +                 apply(x.matrix.num, 2, digest:::num2hex),
  +                 ncol = ncol(x.matrix.num)
  +             )
  +             attr(z, "digest::sha1") <- list(
  +                 class = "matrix",
  +                 digits = 14L,
  +                 zapsmall = 7L
  +             )
  +             digest(z, algo = "sha1")
  +         }
  +     )
  + )
  > stopifnot(
  +     identical(
  +         sha1(x.matrix.letter),
  +         {
  +             z <- x.matrix.letter
  +             attr(z, "digest::sha1") <- list(
  +                 class = "matrix",
  +                 digits = 14L,
  +                 zapsmall = 7L
  +             )
  +             digest(z, algo = "sha1")
  +         }
  +     )
  + )
  > stopifnot(
  +     identical(
  +         sha1(x.factor),
  +         {
  +             z <- x.factor
  +             attr(z, "digest::sha1") <- list(
  +                 class = "factor",
  +                 digits = 14L,
  +                 zapsmall = 7L
  +             )
  +             digest(z, algo = "sha1")
  +         }
  +     )
  + )
  > # a matrix and a vector should have a different hash
  > stopifnot(
  +     !identical(
  +         sha1(x.numeric),
  +         sha1(matrix(x.numeric, nrow = 1))
  +     )
  + )
  > stopifnot(
  +     !identical(
  +         sha1(x.numeric),
  +         sha1(matrix(x.numeric, ncol = 1))
  +     )
  + )
  > stopifnot(
  +     !identical(
  +         sha1(letters),
  +         sha1(matrix(letters, nrow = 1))
  +     )
  + )
  > stopifnot(
  +     !identical(
  +         sha1(letters),
  +         sha1(matrix(letters, ncol = 1))
  +     )
  + )
  > 
  > # character(0) and numeric(0) should have a different hash
  > stopifnot(!identical(sha1(character(0)), sha1(numeric(0))))
  > 
  > # a POSIXct and a POSIXlt should give a different hash
  > z <- as.POSIXct("2015-01-02 03:04:06.07", tz = "UTC")
  > stopifnot(
  +     !identical(
  +         sha1(z),
  +         sha1(as.POSIXlt(z))
  +     )
  + )
  Error in !identical(sha1(z), sha1(as.POSIXlt(z))) : 
    subscript out of bounds
  Calls: stopifnot ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
  Execution halted