Running 'test.read.properties.R' [159s]
  Running 'test.write.properties.R' [169s]
Running the tests in 'tests/test.read.properties.R' failed.
Complete output:
  > # Simple Run-Time Tests for the read.properties function
  > # 
  > # Author: Tobias Verbeke
  > ###############################################################################
  > 
  > require(properties)
  Loading required package: properties
  > 
  > # test 0: simple test of three properties
  > propFilePath <- system.file("testFiles", "test0.properties", package = "properties")
  > (props <- read.properties(file = propFilePath))
  $key1
  [1] "value1"
  
  $key2
  [1] "value2"
  
  $key3
  [1] "value3"
  
  > expectedProps <- list(key1 = "value1", key2 = "value2", key3 = "value3")
  > stopifnot(all.equal(props, expectedProps))
  > 
  > (props <- read.properties(file = propFilePath, fields = c("key2", "key3")))
  $key2
  [1] "value2"
  
  $key3
  [1] "value3"
  
  > stopifnot(all.equal(props, expectedProps[-1]))
  > 
  > # test 2: values with spaces, underscores etc.
  > propFilePath <- system.file("testFiles", "test2.properties", package = "properties")
  > (props <- read.properties(file = propFilePath))
  $reportFile
  [1] "lncap_2010-10-22.pdf"
  
  $experimentName
  [1] "LnCap"
  
  $sweaveFile
  [1] "platereaderTemplate.Rnw"
  
  $rScript
  [1] "platereaderScript.R"
  
  $reportAuthor
  [1] "George Orwell (Big Brother Inc.)"
  
  > expectedProps <- list(reportFile = "lncap_2010-10-22.pdf", experimentName = "LnCap",
  +         sweaveFile = "platereaderTemplate.Rnw", rScript = "platereaderScript.R",
  +         reportAuthor = "George Orwell (Big Brother Inc.)")
  > stopifnot(all.equal(props, expectedProps))
  >     
  > (props <- read.properties(file = propFilePath, fields = c("reportAuthor", "rScript")))
  $reportAuthor
  [1] "George Orwell (Big Brother Inc.)"
  
  $rScript
  [1] "platereaderScript.R"
  
  > stopifnot(all.equal(props, expectedProps[c(5, 4)]))
  > 
  > # test 3: regression test for more than 5 properties
  > propFilePath <- system.file("testFiles", "test3.properties", package = "properties")
  > (props <- read.properties(file = propFilePath))
  $key1
  [1] "value1"
  
  $key2
  [1] "value2"
  
  $key3
  [1] "value3"
  
  $key4
  [1] "value4"
  
  $key5
  [1] "value5"
  
  $key6
  [1] "value6"
  
  $key7
  [1] "value7"
  
  > expectedProps <- list(key1 = "value1", key2 = "value2", key3 = "value3", key4 = "value4", 
  +     key5 = "value5", key6 = "value6", key7 = "value7")
  > stopifnot(all.equal(props, expectedProps))
  > 
  > (props <- read.properties(file = propFilePath, fields = c("key2", "key7")))
  $key2
  [1] "value2"
  
  $key7
  [1] "value7"
  
  > stopifnot(all.equal(props, expectedProps[c(2, 7)]))
  > 
  > # test 4: empty property values
  > propFilePath <- system.file("testFiles", "test4.properties", package = "properties")
  > (props <- read.properties(file = propFilePath))
  $key1
  [1] "value1"
  
  $key2
  [1] ""
  
  $key3
  [1] "value3"
  
  $key4
  [1] ""
  
  > expectedProps <- list(key1 = "value1", key2 = "", key3 = "value3", key4 = "")
  > stopifnot(all.equal(props, expectedProps))
  > 
  > (props <- read.properties(file = propFilePath, fields = c("key2", "key3")))
  $key2
  [1] ""
  
  $key3
  [1] "value3"
  
  > stopifnot(all.equal(props, expectedProps[2:3]))
  > 
  > 
  > proc.time()
     user  system elapsed 
     0.26    0.03    0.26 
Running the tests in 'tests/test.write.properties.R' failed.
Complete output:
  > # Simple Run-Time Tests for the write.properties function
  > # 
  > # Author: Daan Seynaeve
  > ###############################################################################
  > 
  > require(properties)
  Loading required package: properties
  > 
  > # test 0: simple test of three properties
  > props <- list(key1 = "value1", key2 = "value2", key3 = "value3")
  > propFilePath <- tempfile(tmpdir = ".")
  > write.properties(propFilePath, props)
  > expectedLines = c("key1=value1", "key2=value2", "key3=value3")
  > stopifnot(all.equal(readLines(propFilePath), expectedLines))
  > file.remove(propFilePath)
  [1] TRUE
  > 
  > # test 2: values with spaces, underscores etc.
  > expectedProps <- read.properties(system.file("testFiles", "test2.properties", package = "properties"))
  > propFilePath <- tempfile(tmpdir = ".")
  > write.properties(propFilePath, expectedProps)
  > props <- read.properties(propFilePath)
  > stopifnot(all.equal(props, expectedProps))
  > file.remove(propFilePath)
  [1] TRUE
  > 
  > # test 3: regression test for more than 5 properties
  > props <- read.properties(system.file("testFiles", "test3.properties", package = "properties"))
  > propFilePath <- tempfile(tmpdir = ".")
  > write.properties(propFilePath, props, fields = c("key2", "key7"))
  > expectedLines <- c("key2=value2", "key7=value7")
  > stopifnot(all.equal(readLines(propFilePath), expectedLines))
  > file.remove(propFilePath)
  [1] TRUE
  > 
  > # test 4: empty property values
  > expectedProps <- read.properties(system.file("testFiles", "test4.properties", package = "properties"))
  > propFilePath <- tempfile(tmpdir = ".")
  > write.properties(propFilePath, expectedProps)
  > props <- read.properties(propFilePath)
  > stopifnot(all.equal(props, expectedProps))
  > file.remove(propFilePath)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.12    0.10    0.21