[R-gregmisc-users] SF.net SVN: r-gregmisc: [985] trunk/gdata/inst/unitTests/runit.trim.R
Brought to you by:
warnes
From: <wa...@us...> - 2006-09-19 20:54:50
|
Revision: 985 http://svn.sourceforge.net/r-gregmisc/?rev=985&view=rev Author: warnes Date: 2006-09-19 13:52:46 -0700 (Tue, 19 Sep 2006) Log Message: ----------- Explicitly set the local in runit.trim.R to one where leading spaces affect sort order so that the unit test works properly. Modified Paths: -------------- trunk/gdata/inst/unitTests/runit.trim.R Modified: trunk/gdata/inst/unitTests/runit.trim.R =================================================================== --- trunk/gdata/inst/unitTests/runit.trim.R 2006-09-18 20:33:30 UTC (rev 984) +++ trunk/gdata/inst/unitTests/runit.trim.R 2006-09-19 20:52:46 UTC (rev 985) @@ -17,6 +17,9 @@ test.trim <- function() { + tmp <- Sys.getlocale(category="LC_COLLATE") + Sys.setlocale(category="LC_COLLATE", locale="C") + sTrim <- " this is an example string " sTrimR <- "this is an example string" @@ -37,6 +40,8 @@ ) checkIdentical(trim(lTrim), lTrimR) checkIdentical(trim(dfTrim), dfTrimR) + + Sys.setlocale(category="LC_COLLATE", locale=tmp) } ### }}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |