diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2023-03-11 18:15:37 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2023-03-11 18:15:37 +0100 |
commit | dd70ff8bf32c2d7ed365004b1770058265db1978 (patch) | |
tree | 084788d142d86c4dc38f5c48606523b4040596e6 /src/tests/xb_test_dbf_v4_nomemos.cpp | |
parent | 517ad9d4b6eae320b708d03a9340a22893b0cab7 (diff) |
New upstream version 4.1.0upstream/4.1.0
Diffstat (limited to 'src/tests/xb_test_dbf_v4_nomemos.cpp')
-rwxr-xr-x | src/tests/xb_test_dbf_v4_nomemos.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/tests/xb_test_dbf_v4_nomemos.cpp b/src/tests/xb_test_dbf_v4_nomemos.cpp index 4036588..984eb63 100755 --- a/src/tests/xb_test_dbf_v4_nomemos.cpp +++ b/src/tests/xb_test_dbf_v4_nomemos.cpp @@ -2,7 +2,7 @@ XBase 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. @@ -56,9 +56,19 @@ int main( int argCnt, char **av ) { "",0,0,0 } }; + xbSchema MyV4ZipRecord[] = + { + { "ZIPCODE", XB_NUMERIC_FLD, 5, 0 }, + { "CITY", XB_CHAR_FLD, 30, 0 }, + { "STATE", XB_CHAR_FLD, 2, 0 }, + { "",0,0,0 } + }; + + xbXBase x; #ifdef XB_LOGGING_SUPPORT + x.SetLogDirectory( PROJECT_LOG_DIR ); x.EnableMsgLogging(); if( po ){ std::cout << "Logfile is [" << x.GetLogFqFileName().Str() << "]" << std::endl; @@ -69,7 +79,6 @@ int main( int argCnt, char **av ) #endif x.SetDataDirectory( PROJECT_DATA_DIR ); - x.EnableMsgLogging(); #ifdef XB_LOCKING_SUPPORT x.DisableDefaultAutoLock(); @@ -318,10 +327,26 @@ int main( int argCnt, char **av ) rc += TestMethod( po, "GetField()", V4Dbf.GetField( fldAMT, sf ), XB_NO_ERROR ); rc += TestMethod( po, "GetField()", sf, " 432.55", 9 ); + + xbDbf4 V4DbfZ( &x ); // version 4 dbf file + rc2 = V4DbfZ.CreateTable( "TestV4Zip.DBF", "TestV4Zip", MyV4ZipRecord, XB_OVERLAY, XB_MULTI_USER ); + rc += TestMethod( po, "CreateTable()", (xbInt32) rc2, XB_NO_ERROR ); + if( rc2 ) + x.DisplayError( rc2 ); + + + rc += TestMethod( po, "Close()", V4Dbf.Close(), XB_NO_ERROR ); if( po == 2 ) x.DisplayTableList(); + + rc += TestMethod( po, "Close()", V4DbfZ.Close(), XB_NO_ERROR ); + if( po == 2 ) + x.DisplayTableList(); + + + if( po > 0 || rc < 0 ) fprintf( stdout, "Total Errors = %d\n", rc * -1 ); |