Running ‘ChecksumFile.R’ [7s/9s]
  Running ‘GenericDataFile.R’ [5s/8s]
Running the tests in ‘tests/GenericDataFile.R’ failed.
Complete output:
  > source("incl/start.R")
  Loading required package: R.oo
  Loading required package: R.methodsS3
  R.methodsS3 v1.7.1 (2016-02-15) successfully loaded. See ?R.methodsS3 for help.
  R.oo v1.21.0 (2016-10-30) successfully loaded. See ?R.oo for help.
  
  Attaching package: 'R.oo'
  
  The following objects are masked from 'package:methods':
  
      getClasses, getMethods
  
  The following objects are masked from 'package:base':
  
      attach, detach, gc, load, save
  
  R.filesets v2.11.0 successfully loaded. See ?R.filesets for help.
  
  Attaching package: 'R.filesets'
  
  The following objects are masked from 'package:base':
  
      append, readLines
  
  > 
  > message("*** GenericDataFile ...")
  *** GenericDataFile ...
  > 
  > ## Example files
  > path <- system.file("exData", "dataSetA,original", package="R.filesets")
  > print(path)
  [1] "/home/hornik/tmp/R.check/r-release-gcc/Work/build/Packages/R.filesets/exData/dataSetA,original"
  > 
  > ## Setting up a file set
  > ds <- GenericDataFileSet$byPath(path)
  > print(ds)
  GenericDataFileSet:
  Name: dataSetA
  Tags: original
  Full name: dataSetA,original
  Number of files: 11
  Names: 1.2(a), 11.2(a), all, ..., fileFF [11]
  Path (to the first file): ../../../build/Packages/R.filesets/exData/dataSetA,original
  Total file size: 1.90 KiB (1945 bytes)
  > 
  > df <- ds[[1L]]
  > print(df)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: ../../../build/Packages/R.filesets/exData/dataSetA,original/1.2(a).txt
  File size: 153 B (153 bytes)
  > 
  > cat(sprintf("Created on: %s\n", getCreatedOn(df)))
  Created on: 2018-01-01 16:11:23
  > cat(sprintf("Accessed on: %s\n", getLastAccessedOn(df)))
  Accessed on: 2018-01-01 17:39:34
  > 
  > ## Missingness
  > print(is.na(df))
  [1] FALSE
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Comparisons
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > pathT <- file.path(tempdir(), "copy")
  > ds <- copyTo(ds, path=pathT, overwrite=TRUE)
  > 
  > df <- ds[[1]]
  > res <- equals(df, df)
  > print(res)
  [1] TRUE
  > stopifnot(res)
  > 
  > res <- equals(df, NULL)
  > print(res)
  [1] FALSE
  attr(,"thisFile")
  [1] "../../../../../../../../../tmp/RtmpaDQZnp/copy/1.2(a).txt"
  attr(,"reason")
  [1] "The 'other' is not a GenericDataFile: NULL"
  > stopifnot(!res)
  > 
  > res <- equals(df, NA)
  > print(res)
  [1] FALSE
  attr(,"thisFile")
  [1] "../../../../../../../../../tmp/RtmpaDQZnp/copy/1.2(a).txt"
  attr(,"reason")
  [1] "The 'other' is not a GenericDataFile: logical"
  > stopifnot(!res)
  > 
  > res <- equals(df, ds)
  > print(res)
  [1] FALSE
  attr(,"thisFile")
  [1] "../../../../../../../../../tmp/RtmpaDQZnp/copy/1.2(a).txt"
  attr(,"reason")
  [1] "The 'other' is not a GenericDataFile: GenericDataFileSet"
  > stopifnot(!res)
  > 
  > print(df)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: /tmp/RtmpaDQZnp/copy/1.2(a).txt
  File size: 153 B (153 bytes)
  > print(getChecksum(df, verbose=TRUE))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > print(readChecksum(df))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > 
  > print(df)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: /tmp/RtmpaDQZnp/copy/1.2(a).txt
  File size: 153 B (153 bytes)
  > print(getChecksum(df, force=TRUE, verbose=TRUE))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > 
  > print(df)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: /tmp/RtmpaDQZnp/copy/1.2(a).txt
  File size: 153 B (153 bytes)
  > print(getChecksum(df, write=TRUE, force=TRUE, verbose=TRUE))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > 
  > print(df)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: /tmp/RtmpaDQZnp/copy/1.2(a).txt
  File size: 153 B (153 bytes)
  > print(getChecksum(df, write=FALSE, force=TRUE, verbose=TRUE))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > 
  > 
  > pathT <- file.path(tempdir(), "foo")
  > dfC <- copyTo(df, path=pathT, overwrite=TRUE)
  > print(dfC)
  GenericDataFile:
  Name: 1.2(a)
  Tags: 
  Full name: 1.2(a)
  Pathname: /tmp/RtmpaDQZnp/foo/1.2(a).txt
  File size: 153 B (153 bytes)
  > res <- equals(df, dfC)
  > print(res)
  [1] TRUE
  > stopifnot(res)
  > mod <- hasBeenModified(dfC)
  > stopifnot(!mod)
  > print(getChecksum(dfC))
  [1] "932b17dafa6774b5a36fd71420ffe706"
  > 
  > mod1 <- hasBeenModified(dfC, update=FALSE)
  > print(mod1)
  [1] FALSE
  attr(,"lastModifiedOn")
  [1] "2018-01-01 17:39:46 CET"
  attr(,"prevModifiedOn")
  [1] "2018-01-01 17:39:46 CET"
  > mod2 <- hasBeenModified(dfC, update=FALSE)
  > print(mod2)
  [1] FALSE
  attr(,"lastModifiedOn")
  [1] "2018-01-01 17:39:46 CET"
  attr(,"prevModifiedOn")
  [1] "2018-01-01 17:39:46 CET"
  > stopifnot(identical(mod2, mod1))
  > 
  > 
  > ## Make sure we can detect differences in timestamps
  > Sys.sleep(1.5)
  > raw <- raw(length=getFileSize(dfC))
  > writeBin(raw, con=getPathname(dfC))
  Warning in file(con, "wb") :
    cannot open file '../../../../../../../../../tmp/RtmpaDQZnp/foo/1.2(a).txt': Permission denied
  Error in file(con, "wb") : cannot open the connection
  Calls: writeBin -> file
  Execution halted