@ -138,17 +138,6 @@ TEST_F (GncTokenizerTest, tokenize_from_csv_file)
* independently .
*/
/* First test whether we're properly catching boost::tokenizer throws
* This happens when the input data has invalid escape sequences */
TEST_F ( GncTokenizerTest , tokenize_binary_data )
{
GncCsvTokenizer * csvtok = dynamic_cast < GncCsvTokenizer * > ( csv_tok . get ( ) ) ;
csvtok - > set_separators ( " , " ) ;
set_utf8_contents ( csv_tok , R " ( \764 Test,Something) " ) ;
EXPECT_THROW ( csv_tok - > tokenize ( ) , std : : range_error ) ;
}
/* This helper function will run the parse step on the given data
* with the parser as configured by the calling test function .
* This allows the same code to be used with different csv test strings
@ -185,6 +174,8 @@ static tokenize_csv_test_data comma_separated [] = {
{ " Date,Num,Description,Notes,Account,Deposit,Withdrawal,Balance " , 8 , { " Date " , " Num " , " Description " , " Notes " , " Account " , " Deposit " , " Withdrawal " , " Balance " } } ,
{ " 05/01/15,45,Acme Inc.,,Miscellaneous,, \" 1,100.00 \" , " , 8 , { " 05/01/15 " , " 45 " , " Acme Inc. " , " " , " Miscellaneous " , " " , " 1,100.00 " , " " } } ,
{ " 05/01/15,45,Acme Inc.,,Miscellaneous, " , 6 , { " 05/01/15 " , " 45 " , " Acme Inc. " , " " , " Miscellaneous " , " " , NULL , NULL } } ,
{ " Test \\ with backslash,nextfield " , 2 , { " Test \\ with backslash " , " nextfield " , NULL , NULL , NULL , NULL , NULL , NULL } } ,
{ " Test with \\ \" escaped quote,nextfield " , 2 , { " Test with \" escaped quote " , " nextfield " , NULL , NULL , NULL , NULL , NULL , NULL } } ,
{ NULL , 0 , { NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL } } ,
} ;