[glom/glom-1-16] Fix the CSV import test.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-16] Fix the CSV import test.
- Date: Sat, 26 Feb 2011 19:18:39 +0000 (UTC)
commit 942d06537542be952581ebc86a091a2cec6d9150
Author: Murray Cumming <murrayc murrayc com>
Date: Sat Feb 26 16:00:02 2011 +0100
Fix the CSV import test.
* tests/import/test_parsing.cc: Correct the number of expected tokens.
This was previously just the number that was (incorrectly) parsed before.
ChangeLog | 7 +++++++
tests/import/test_parsing.cc | 5 ++++-
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cc789cb..042586e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-02-26 Murray Cumming <murrayc murrayc com>
+ Fix the CSV import test.
+
+ * tests/import/test_parsing.cc: Correct the number of expected tokens.
+ This was previously just the number that was (incorrectly) parsed before.
+
+2011-02-26 Murray Cumming <murrayc murrayc com>
+
CSV Import: Fix quoted-newline detection, so we don't drop rows.
* glom/import_csv/csv_parser.[h|cc]: on_idle_parse(): Make in_quotes a
diff --git a/tests/import/test_parsing.cc b/tests/import/test_parsing.cc
index 6ee3922..c16d474 100644
--- a/tests/import/test_parsing.cc
+++ b/tests/import/test_parsing.cc
@@ -204,8 +204,11 @@ int main(int argc, char* argv[])
// filename_to_uri expects absolute filenames
const std::string filename = Glib::build_filename(Glib::get_current_dir(), "tests/import/data/albums.csv");
const bool finished_parsing = ImportTests::run_parser_on_file(&connect_signals, Glib::filename_to_uri(filename));
+ //std::cout << "tokens count=" << get_tokens_instance().size() << std::endl;
+ const guint expected_tokens = 1348.0 /* lines */ * 7.0 /* columns */;
+ //std::cout << "expected_tokens=" << expected_tokens << std::endl;
const bool passed = (finished_parsing &&
- 8450 == get_tokens_instance().size());
+ expected_tokens == get_tokens_instance().size());
get_tokens_instance().clear();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]