diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-05-24 13:55:19 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-08-03 13:26:11 +0900 |
| commit | fbc41d795b8251180e09d003171f346487e7ab25 (patch) | |
| tree | 6199fae0522a9d4c22a917de9b0b00d31ac4faa4 /src/tests/kretest.cpp | |
| parent | 9a622918b2f64e81006356124a045ba99cc3765d (diff) | |
| download | krecipes-fbc41d79.tar.gz krecipes-fbc41d79.zip | |
Fix importers/exporters bugs. Fix tests and add them to build process.
The file `mx2test.txt` is taken from KRecipes 2.1 source code.
Other tests have been adjusted based on the tests in KRecipes 2.1 source code.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit dfbafdbb2f7369438a750327544f9084a765e407)
Diffstat (limited to 'src/tests/kretest.cpp')
| -rw-r--r-- | src/tests/kretest.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tests/kretest.cpp b/src/tests/kretest.cpp index 941e30d..3b2d098 100644 --- a/src/tests/kretest.cpp +++ b/src/tests/kretest.cpp @@ -167,7 +167,6 @@ main(int argc, char *argv[]) recipe.ratingList.append(rating1); recipe.ratingList.append(rating2); - check( importer, recipe ); check( importer, catTree ); @@ -178,16 +177,16 @@ main(int argc, char *argv[]) printf("Creating KreExporter.\n"); KreExporter exporter(catTree,"not needed",".kreml"); - check( exporter, recipeList ); - printf("Successfully exported recipes to test.txt.\n"); + const char *outfile = "kretest_output.txt"; + check( outfile, exporter, recipeList ); + printf("Successfully exported recipes to %s.\n", outfile); printf("Creating KreImporter to test exported recipes.\n"); KreImporter importer2; - printf("Parsing test.txt.\n"); - TQStringList files2; files2 << "test.txt"; + printf("Parsing %s.\n", outfile); + TQStringList files2; files2 << TQString(outfile); importer2.parseFiles(files2); - TQFile::remove("test.txt"); check( importer2, recipe ); check( importer2, catTree ); printf("Recipe export successful.\n"); |
