[R-gregmisc-users] SF.net SVN: r-gregmisc:[1836] trunk/SASxport/tests
Brought to you by:
warnes
From: <wa...@us...> - 2014-07-18 15:29:16
|
Revision: 1836 http://sourceforge.net/p/r-gregmisc/code/1836 Author: warnes Date: 2014-07-18 15:29:13 +0000 (Fri, 18 Jul 2014) Log Message: ----------- Write file data as hex bytes so R CMD check's diff can display up differences. Modified Paths: -------------- trunk/SASxport/tests/Alfalfa_Test.R trunk/SASxport/tests/cars.R trunk/SASxport/tests/xxx.R Modified: trunk/SASxport/tests/Alfalfa_Test.R =================================================================== --- trunk/SASxport/tests/Alfalfa_Test.R 2014-07-18 12:10:22 UTC (rev 1835) +++ trunk/SASxport/tests/Alfalfa_Test.R 2014-07-18 15:29:13 UTC (rev 1836) @@ -20,5 +20,8 @@ a.1 <- readBin( con="Alfalfa.xpt", what=raw(), n=3600 ) a.2 <- readBin( con="Alfalfa2.xpt", what=raw(), n=3600 ) +## Display for diff +a.2 + ## Test that the files are identical stopifnot( all(a.1 == a.2) ) Modified: trunk/SASxport/tests/cars.R =================================================================== --- trunk/SASxport/tests/cars.R 2014-07-18 12:10:22 UTC (rev 1835) +++ trunk/SASxport/tests/cars.R 2014-07-18 15:29:13 UTC (rev 1836) @@ -15,7 +15,7 @@ cDate=strptime("28JUL07: 20:59:49", format="%d%b%y:%H:%M:%S"), osType="SunOS", sasVer="9.1", - autogen.formats=FALSE + autogen.formats=FALSE ) @@ -23,5 +23,8 @@ a.1 <- readBin( con="cars.xpt", what=raw(), n=1e5) a.2 <- readBin( con="cars2.xpt", what=raw(), n=1e5) +## Display for diff +a.2 + ## Test that the files are identical stopifnot( all(a.1 == a.2) ) Modified: trunk/SASxport/tests/xxx.R =================================================================== --- trunk/SASxport/tests/xxx.R 2014-07-18 12:10:22 UTC (rev 1835) +++ trunk/SASxport/tests/xxx.R 2014-07-18 15:29:13 UTC (rev 1836) @@ -31,7 +31,7 @@ cDate=strptime("28JUL07:21:08:06 ", format="%d%b%y:%H:%M:%S"), osType="SunOS", sasVer="9.1", - autogen.formats=FALSE + autogen.formats=FALSE ) @@ -45,10 +45,15 @@ ## R doesn't have multiple NA types, while SAS does. The original ## file contains a SAS '.A' missing value, while what we've created ## contains an ordinary '.' missing value, so mash this one byte to -## avoid a comparison error for this known limitation. +## avoid a comparison error for this known limitation. a.1[1089] <- as.raw("0x2e") +## Display the created files for diff +a.2 + +a.3 + ## Test that the files are otherwise identical stopifnot( all(a.1 == a.2) ) stopifnot( all(a.1 == a.3) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |