summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2009-03-30 08:10:37 (GMT)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2009-03-30 08:10:37 (GMT)
commit318bfab8c13808da15f57b7e72d7c3f831722d57 (patch)
tree788f2109f27a610766cf59c137f69ca64cf7c634 /Source
parent1bd0b15145d5436f9209342621aee6482987b570 (diff)
downloadCMake-318bfab8c13808da15f57b7e72d7c3f831722d57.zip
CMake-318bfab8c13808da15f57b7e72d7c3f831722d57.tar.gz
CMake-318bfab8c13808da15f57b7e72d7c3f831722d57.tar.bz2
ENH: remote debugging of sunos
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/testIOS.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/kwsys/testIOS.cxx b/Source/kwsys/testIOS.cxx
index e4e0a2d..8fab580 100644
--- a/Source/kwsys/testIOS.cxx
+++ b/Source/kwsys/testIOS.cxx
@@ -15,12 +15,23 @@
int testIOS(int, char*[])
{
kwsys_ios::ostringstream ostr;
- ostr << "hello";
- if(ostr.str() != "hello")
+ const char hello[] = "hello";
+ ostr << hello;
+ if(ostr.str() != hello)
{
kwsys_ios::cerr << "failed to write hello to ostr" << kwsys_ios::endl;
return 1;
}
+ const char world[] = "world";
+ kwsys_ios::ostringstream ostr2;
+ ostr2.write( hello, strlen(hello) );
+ ostr2.put( '\0' );
+ ostr2.write( world, strlen(world) );
+ if(ostr2.str().size() != strlen(hello) + 1 + strlen(world) )
+ {
+ kwsys_ios::cerr << "failed to write hello to ostr2" << kwsys_ios::endl;
+ return 1;
+ }
kwsys_ios::istringstream istr(" 10 20 str ");
kwsys_stl::string s;
int x;