summaryrefslogtreecommitdiff
path: root/src/tests/xb_test_string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/xb_test_string.cpp')
-rwxr-xr-xsrc/tests/xb_test_string.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tests/xb_test_string.cpp b/src/tests/xb_test_string.cpp
index 9d730db..2f01e51 100755
--- a/src/tests/xb_test_string.cpp
+++ b/src/tests/xb_test_string.cpp
@@ -2,7 +2,7 @@
XBase63 Software Library
-Copyright (c) 1997,2003,2014, 2022 Gary A Kunkel
+Copyright (c) 1997,2003,2014,2022,2023 Gary A Kunkel
The xb64 software library is covered under the terms of the GPL Version 3, 2007 license.
@@ -46,6 +46,7 @@ int main( int argCnt, char **av = NULL )
xbString sMsg;
#ifdef XB_LOGGING_SUPPORT
+ x.SetLogDirectory( PROJECT_LOG_DIR );
x.EnableMsgLogging();
if( po ){
std::cout << "Logfile is [" << x.GetLogFqFileName().Str() << "]" << std::endl;
@@ -55,7 +56,6 @@ int main( int argCnt, char **av = NULL )
#endif
x.SetDataDirectory( PROJECT_DATA_DIR );
- x.EnableMsgLogging();
InitTime();
@@ -260,6 +260,13 @@ int main( int argCnt, char **av = NULL )
rc += TestMethod( po, "Pos(\"000\") ", (xbInt32) s1.Pos( "000" ), 0 );
rc += TestMethod( po, "Pos(\"DEF\") ", (xbInt32) s1.Pos( "DEF" ), 1 );
+ s1 = "ABC.123.abc";
+ rc += TestMethod( po, "Pos( '.', 4 )", (xbInt32) s1.Pos( '.', 4 ), 4 );
+ rc += TestMethod( po, "Pos( '.', 5 )", (xbInt32) s1.Pos( '.', 5 ), 8 );
+ rc += TestMethod( po, "Pos( '.', 9 )", (xbInt32) s1.Pos( '.', 9 ), 0 );
+
+
+
s1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
rc += TestMethod( po, "Remove(3,5) ", s1.Remove( 3, 5 ), "ABHIJKLMNOPQRSTUVWXYZ", 21 );