summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-10-13 11:56:14 +0900
committerMichele Calgaro <[email protected]>2024-10-21 09:29:11 +0900
commit0c8ed6c9a4000af8f48581a81c4b5c2f5b9fd502 (patch)
tree10f9d3223f0a0904a0748a28ca44da52ee1092b7 /src/tests
parent7d5ba3180a82a0827c1fbd6dc93a2abf4f882c37 (diff)
downloadkrecipes-0c8ed6c9a4000af8f48581a81c4b5c2f5b9fd502.tar.gz
krecipes-0c8ed6c9a4000af8f48581a81c4b5c2f5b9fd502.zip
Rearrange folders structure to remove unnecessary 'krecipes' second level subfolder
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/Makefile.am19
-rw-r--r--src/tests/checks.h181
-rw-r--r--src/tests/exportertest.h42
-rw-r--r--src/tests/importertest.h45
-rw-r--r--src/tests/kretest.cpp191
-rw-r--r--src/tests/kretest.txt409
-rw-r--r--src/tests/mmftest.cpp139
-rw-r--r--src/tests/mmftest.txt49
-rw-r--r--src/tests/mx2test.cpp72
-rw-r--r--src/tests/mx2test.txt0
-rw-r--r--src/tests/mxptest.cpp72
-rw-r--r--src/tests/mxptest.txt25
-rw-r--r--src/tests/nyctest.cpp100
-rw-r--r--src/tests/nyctest.txt57
-rw-r--r--src/tests/recipemltest.cpp158
-rw-r--r--src/tests/recipemltest.txt249
-rw-r--r--src/tests/rezkonvtest.cpp155
-rw-r--r--src/tests/rezkonvtest.txt55
-rw-r--r--src/tests/test_photo.jpgbin0 -> 3369 bytes
19 files changed, 2018 insertions, 0 deletions
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
new file mode 100644
index 0000000..2a5e97b
--- /dev/null
+++ b/src/tests/Makefile.am
@@ -0,0 +1,19 @@
+INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../importers -I$(srcdir)/../exporters $(all_includes)
+
+AM_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+
+check_PROGRAMS = kretest mmftest mx2test mxptest rezkonvtest nyctest recipemltest
+
+noinst_HEADERS = importertest.h exportertest.h
+
+METASOURCES = AUTO
+
+LDADD = ../importers/libkrecipesimporters.la ../exporters/libkrecipesexporters.la ../backends/libkrecipesdbs.la ../datablocks/libdatablocks.la $(LIB_TQT) $(LIB_TDEHTML) $(LIB_TDESPELL)
+
+kretest_SOURCES = kretest.cpp
+mmftest_SOURCES = mmftest.cpp
+mx2test_SOURCES = mx2test.cpp
+mxptest_SOURCES = mxptest.cpp
+rezkonvtest_SOURCES = rezkonvtest.cpp
+nyctest_SOURCES = nyctest.cpp
+recipemltest_SOURCES = recipemltest.cpp
diff --git a/src/tests/checks.h b/src/tests/checks.h
new file mode 100644
index 0000000..e697814
--- /dev/null
+++ b/src/tests/checks.h
@@ -0,0 +1,181 @@
+/***************************************************************************
+* Copyright (C) 2005 by *
+* Jason Kivlighn ([email protected]) *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+***************************************************************************/
+
+#ifndef CHECKS_H
+#define CHECKS_H
+
+#include <cmath>
+#include <iostream>
+
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+
+#include "datablocks/categorytree.h"
+#include "datablocks/rating.h"
+
+using std::cout;
+using std::cerr;
+using std::endl;
+
+void check( const RatingList &rating, const RatingList &base );
+
+bool check(const TQString &txt, const TQString &a, const TQString &b)
+{
+ if ( a != b ) {
+ cout << "ERROR: Tested " << txt.latin1() << ", expected" << endl;
+ cout << "'" << b.latin1() << "' (" << b.length() << " chars)" << endl;
+ cout << "but got" << endl;
+ cout << "'" << a.latin1() << "' (" << a.length() << " chars)" << endl;
+ exit( 1 );
+ }
+
+ return true;
+}
+
+bool check(const TQString &txt, int a, int b)
+{
+ if ( a != b ) {
+ cout << "ERROR: Tested " << txt.latin1() << ", expected" << endl;
+ cout << "'" << b << "'" << endl;
+ cout << "but got" << endl;
+ cout << "'" << a << "'" << endl;
+ exit( 1 );
+ }
+
+ return true;
+}
+
+bool check(const TQString &txt, double a, double b)
+{
+ if ( fabs(a - b) > 1e-10 ) {
+ cout << "ERROR: Tested " << txt.latin1() << ", expected" << endl;
+ cout << "'" << b << "'" << endl;
+ cout << "but got" << endl;
+ cout << "'" << a << "'" << endl;
+ exit( 1 );
+ }
+
+ return true;
+}
+
+bool check(const TQString &txt, const TQPixmap &a, const TQPixmap &b)
+{
+ if ( a.size() != b.size() ) {
+
+ cout << "ERROR: Tested " << txt.latin1() << ": photos differ" << endl;
+ // exit( 1 );
+ }
+
+ return true;
+}
+
+void check( const IngredientData &ing, const IngredientData &base_ing, int ing_num )
+{
+ check( TQString::number(ing_num)+": Ingredient name", ing.name, base_ing.name );
+ check( TQString::number(ing_num)+": Ingredient amount", ing.amount,base_ing.amount );
+ check( TQString::number(ing_num)+": Ingredient amount_offset", ing.amount_offset,base_ing.amount_offset );
+ check( TQString::number(ing_num)+": Ingredient singular unit", ing.units.name, base_ing.units.name );
+ check( TQString::number(ing_num)+": Ingredient plural unit", ing.units.plural, base_ing.units.plural );
+ check( TQString::number(ing_num)+": Ingredient group", ing.group, base_ing.group );
+
+ ElementList::const_iterator prep_it = ing.prepMethodList.begin();
+ ElementList::const_iterator base_prep_it = base_ing.prepMethodList.begin();
+ for ( ; prep_it != ing.prepMethodList.end(); ++prep_it, ++base_prep_it ) {
+ check( TQString::number(ing_num)+": Ingredient prep_method", (*prep_it).name, (*base_prep_it).name );
+ }
+}
+
+void check( const Recipe &recipe, const Recipe &base )
+{
+ check( "Recipe title", recipe.title, base.title );
+ check( "Yield base", recipe.yield.amount, base.yield.amount );
+ check( "Yield offset", recipe.yield.amount_offset, base.yield.amount_offset );
+ check( "Yield type", recipe.yield.type, base.yield.type );
+ check( "Instructions", recipe.instructions, base.instructions );
+ check( "Photo", recipe.photo, base.photo );
+
+ check( recipe.ratingList, base.ratingList );
+
+ int cat_num = 1;
+ ElementList::const_iterator cat_it = recipe.categoryList.begin();
+ ElementList::const_iterator base_cat_it = base.categoryList.begin();
+ for ( ; cat_it != recipe.categoryList.end() || base_cat_it != base.categoryList.end(); ++cat_it, ++base_cat_it ) {
+ check( TQString::number(cat_num)+": Category", (*cat_it).name, (*base_cat_it).name );
+ ++cat_num;
+ }
+ check( "category count", cat_num-1, base.categoryList.count() );
+
+ int author_num = 1;
+ ElementList::const_iterator author_it = recipe.authorList.begin();
+ ElementList::const_iterator base_author_it = base.authorList.begin();
+ for ( ; author_it != recipe.authorList.end() || base_author_it != base.authorList.end(); ++author_it, ++base_author_it ) {
+ check( TQString::number(author_num)+": Author", (*author_it).name, (*base_author_it).name );
+ ++author_num;
+ }
+ check( "author count", author_num-1, base.authorList.count() );
+
+ int ing_num = 1;
+ IngredientList::const_iterator ing_it = recipe.ingList.begin();
+ IngredientList::const_iterator base_ing_it = base.ingList.begin();
+ for ( ; ing_it != recipe.ingList.end() || base_ing_it != base.ingList.end(); ++ing_it, ++base_ing_it ) {
+ check( *ing_it, *base_ing_it, ing_num );
+
+ TQValueList<IngredientData>::const_iterator base_sub_it = (*base_ing_it).substitutes.begin();
+ for ( TQValueList<IngredientData>::const_iterator sub_it = (*ing_it).substitutes.begin(); sub_it != (*ing_it).substitutes.end(); ++sub_it, ++base_sub_it ) {
+ check( *sub_it, *base_sub_it, ing_num+1000 );
+ }
+
+ ++ing_num;
+ }
+ check( "ingredient count", ing_num-1, base.ingList.count() );
+}
+
+bool check( const CategoryTree *catStructure, const CategoryTree *baseCatStructure )
+{
+ CategoryTree * it = catStructure->firstChild();
+ CategoryTree * base_it = baseCatStructure->firstChild();
+ for ( ; it && base_it; it = it->nextSibling(), base_it = base_it->nextSibling() ) {
+ check( it, base_it );
+
+ if ( it->category.name != base_it->category.name ) {
+ printf("FAILED: Category structure differs\n");
+ exit(1);
+ }
+ }
+
+ if ( base_it != it ) { //these should both be NULL
+ printf("FAILED: Category structure differs\n");
+ exit(1);
+ }
+
+ return true;
+}
+
+void check( const RatingList &rating, const RatingList &base )
+{
+ RatingList::const_iterator rating_it = rating.begin();
+ RatingList::const_iterator base_rating_it = base.begin();
+ for ( ; rating_it != rating.end() || base_rating_it != base.end(); ++rating_it, ++base_rating_it ) {
+ check("checking rater",(*rating_it).rater,(*base_rating_it).rater);
+ check("checking comment",(*rating_it).comment,(*base_rating_it).comment);
+
+ RatingCriteriaList::const_iterator rc_it = (*rating_it).ratingCriteriaList.begin();
+ RatingCriteriaList::const_iterator base_rc_it = (*base_rating_it).ratingCriteriaList.begin();
+ for ( ; rc_it != (*rating_it).ratingCriteriaList.end() || base_rc_it != (*base_rating_it).ratingCriteriaList.end(); ++rc_it, ++base_rc_it ) {
+ check("checking criteria name",(*rc_it).name,(*base_rc_it).name);
+ check("checking stars",(*rc_it).stars,(*base_rc_it).stars);
+ }
+ check( "criteria count", int((*rating_it).ratingCriteriaList.count()), int((*base_rating_it).ratingCriteriaList.count()) );
+ }
+ check( "rating count", int(rating.count()), int(base.count()) );
+}
+
+#endif
diff --git a/src/tests/exportertest.h b/src/tests/exportertest.h
new file mode 100644
index 0000000..739a57c
--- /dev/null
+++ b/src/tests/exportertest.h
@@ -0,0 +1,42 @@
+/***************************************************************************
+* Copyright (C) 2005 by *
+* Jason Kivlighn ([email protected]) *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+***************************************************************************/
+
+#ifndef EXPORTERTEST_H
+#define EXPORTERTEST_H
+
+#include <cmath>
+#include <iostream>
+
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+
+#include "checks.h"
+
+using std::cout;
+using std::cerr;
+using std::endl;
+
+void check( BaseExporter &exporter, const RecipeList &recipeList )
+{
+ TQFile file("test.txt");
+ if ( file.open( IO_WriteOnly ) ) {
+ TQTextStream stream(&file);
+ exporter.writeStream(stream,recipeList);
+ }
+ else {
+ printf("Unable to open file for writing\n");
+ exit(1);
+ }
+
+ file.close();
+}
+
+#endif
diff --git a/src/tests/importertest.h b/src/tests/importertest.h
new file mode 100644
index 0000000..f5aff84
--- /dev/null
+++ b/src/tests/importertest.h
@@ -0,0 +1,45 @@
+/***************************************************************************
+* Copyright (C) 2005 by *
+* Jason Kivlighn ([email protected]) *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+***************************************************************************/
+
+#ifndef IMPORTERTEST_H
+#define IMPORTERTEST_H
+
+#include <cmath>
+#include <iostream>
+
+#include <tqstring.h>
+
+#include "checks.h"
+#include "datablocks/categorytree.h"
+
+using std::cout;
+using std::endl;
+
+void check( const BaseImporter &importer, const Recipe &recipe )
+{
+ int recipe_num = 1;
+ RecipeList recipeList = importer.recipeList();
+ for ( RecipeList::const_iterator it = recipeList.begin(); it != recipeList.end(); ++it ) {
+ printf("Recipe %d... ",recipe_num);
+ check( *it, recipe );
+ printf("successful\n");
+ ++recipe_num;
+ }
+
+ check( "recipe count", recipe_num-1, 2 );
+}
+
+void check( const BaseImporter &importer, const CategoryTree *baseCatStructure )
+{
+ printf("Checking category structure.\n");
+ check( importer.categoryStructure(), baseCatStructure );
+}
+
+#endif
diff --git a/src/tests/kretest.cpp b/src/tests/kretest.cpp
new file mode 100644
index 0000000..10c88c2
--- /dev/null
+++ b/src/tests/kretest.cpp
@@ -0,0 +1,191 @@
+/***************************************************************************
+* Copyright (C) 2005 by *
+* Jason Kivlighn ([email protected]) *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+***************************************************************************/
+
+#include <tdeapplication.h>
+
+#include <tqstring.h>
+#include <tqfile.h>
+
+#include <iostream>
+
+#include "kreimporter.h"
+#include "kreexporter.h"
+#include "importertest.h"
+#include "exportertest.h"
+
+int
+main(int argc, char *argv[])
+{
+ TDEApplication a(argc, argv, "kretest");
+
+ printf("Creating KreImporter.\n");
+ KreImporter importer;
+
+ printf("Parsing kretest.txt.\n");
+ TQStringList files; files << "kretest.txt";
+ importer.parseFiles(files);
+
+ Recipe recipe;
+ recipe.title = "Cookies_Test";
+ recipe.yield.amount = 2;
+ recipe.yield.amount_offset = 1;
+ recipe.yield.type = "dozen";
+ recipe.categoryList.append( Element("Snacks",1) );
+ recipe.categoryList.append( Element("Cookies & Squares",2) );
+ recipe.instructions =
+ "Drop by spoonful on greased cookie sheet. Bake in moderate oven.";
+ recipe.prepTime = TQTime(0,30);
+ if ( !recipe.photo.load( "test_photo.jpg", "JPEG" ) ) {
+ printf("Unable to load test_photo.jpg\n");
+ exit(1);
+ }
+
+ recipe.authorList.append( Element("Colleen Beamer") );
+ recipe.authorList.append( Element("Mona Beamer") );
+
+ Ingredient ing;
+ ing.name = "granulated sugar";
+ ing.amount = 0.75;
+ ing.amount_offset = 0.25;
+ ing.units.name = "c.";
+ ing.groupID = 0; ing.group = "Dry Ingredients";
+ recipe.ingList.append( ing );
+
+ Ingredient ing2;
+ ing2.name = "brown sugar";
+ ing2.amount = 1;
+ ing2.amount_offset = 0;
+ ing2.units.name = "c.";
+ ing2.groupID = 0; ing2.group = "Dry Ingredients";
+ recipe.ingList.append( ing2 );
+
+ Ingredient ing3;
+ ing3.name = "all-purpose flour";
+ ing3.amount = 2;
+ ing3.units.plural = "c.";
+ ing3.groupID = 0; ing3.group = "Dry Ingredients";
+ recipe.ingList.append( ing3 );
+
+ Ingredient ing4;
+ ing4.name = "baking soda";
+ ing4.amount = 1;
+ ing4.amount_offset = 0;
+ ing4.units.name = "tsp.";
+ ing4.groupID = 0; ing4.group = "Dry Ingredients";
+ recipe.ingList.append( ing4 );
+
+ Ingredient ing8;
+ ing8.name = "shortening";
+ ing8.amount = 1;
+ ing8.amount_offset = 0;
+ ing8.units.name = "c.";
+ ing8.prepMethodList.append( Element("softened") );
+ ing8.prepMethodList.append( Element("at room temperature") );
+ ing8.groupID = 1; ing8.group = "Fat & Liquids";
+ recipe.ingList.append( ing8 );
+
+ Ingredient ing6;
+ ing6.name = "peanut butter";
+ ing6.amount = 1;
+ ing6.amount_offset = 0;
+ ing6.units.name = "c.";
+ ing6.groupID = 1; ing6.group = "Fat & Liquids";
+ recipe.ingList.append( ing6 );
+
+ Ingredient ing5;
+ ing5.name = "eggs";
+ ing5.amount = 2;
+ ing5.amount_offset = 0;
+ ing5.units.plural = "";
+ ing5.groupID = 1; ing5.group = "Fat & Liquids";
+ recipe.ingList.append( ing5 );
+
+ Ingredient ing7;
+ ing7.name = "vanilla extract";
+ ing7.amount = 1;
+ ing7.amount_offset = 0;
+ ing7.units.name = "tsp.";
+ ing7.groupID = 1; ing7.group = "Fat & Liquids";
+ recipe.ingList.append( ing7 );
+
+ Ingredient ing9;
+ ing9.name = "a";
+ ing9.amount = 1;
+ ing9.amount_offset = 0;
+ ing9.units.name = "cup";
+ IngredientData ing9_1;
+ ing9_1.name = "b";
+ ing9_1.amount = 2;
+ ing9_1.amount_offset = 0;
+ ing9_1.units.plural = "cups";
+ IngredientData ing9_2;
+ ing9_2.name = "c";
+ ing9_2.amount = 3;
+ ing9_2.amount_offset = 0;
+ ing9_2.units.plural = "cups";
+ ing9.substitutes.append(ing9_1);
+ ing9.substitutes.append(ing9_2);
+ recipe.ingList.append( ing9 );
+
+ CategoryTree *catTree = new CategoryTree;
+ (void)catTree->add( Element("Cookies & Squares",2) );
+ (void)catTree->add( Element("Snacks",1) );
+
+ RatingCriteria rc;
+ Rating rating1;
+ rating1.rater = "George McFry";
+ rating1.comment = "Good enough";
+
+ rc.name = "Taste";
+ rc.stars = 5.0;
+ rating1.append(rc);
+
+ Rating rating2;
+ rating2.rater = "Me";
+ rating2.comment = "Yuck, don't eat!";
+
+ rc.name = "Overall";
+ rc.stars = 2.0;
+ rating2.append(rc);
+
+ rc.name = "Taste";
+ rc.stars = 1.5;
+ rating2.append(rc);
+
+ recipe.ratingList.append(rating1);
+ recipe.ratingList.append(rating2);
+
+
+ check( importer, recipe );
+ check( importer, catTree );
+
+
+ RecipeList recipeList;
+ recipeList.append(recipe);
+ recipeList.append(recipe);
+
+ printf("Creating KreExporter.\n");
+ KreExporter exporter(catTree,"not needed",".kreml");
+ check( exporter, recipeList );
+ printf("Successfully exported recipes to test.txt.\n");
+
+ printf("Creating KreImporter to test exported recipes.\n");
+ KreImporter importer2;
+
+ printf("Parsing test.txt.\n");
+ TQStringList files2; files2 << "test.txt";
+ importer2.parseFiles(files2);
+ TQFile::remove("test.txt");
+ check( importer2, recipe );
+ check( importer2, catTree );
+ printf("Recipe export successful.\n");
+
+ printf("*** Krecipes importer and exporter passed the tests :-) ***\n");
+}
diff --git a/src/tests/kretest.txt b/src/tests/kretest.txt
new file mode 100644
index 0000000..35b4ae6
--- /dev/null
+++ b/src/tests/kretest.txt
@@ -0,0 +1,409 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<krecipes version="SVN_PRE-0.9" lang="en_US" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="krecipes.xsd">
+<krecipes-category-structure>
+<category name="Cookies &amp; Squares">
+</category>
+<category name="Snacks">
+</category>
+</krecipes-category-structure>
+<krecipes-recipe>
+<krecipes-description>
+<title>Cookies_Test</title>
+<author>Colleen Beamer</author>
+<author>Mona Beamer</author>
+<pictures>
+<pic format="JPEG" id="1"><![CDATA[/9j/4AAQSkZJRgABAQIAAAAAAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a
+HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy
+MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCACmAIMDASIA
+AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA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gDgHqO
+1Yq/DaK2uXey1m6ghPCRMgkCD05r03+wrvsI8f71J/Yd5jGI/wDvqumUIz+JXEmzi7LwVpVpc290
+4muLiHBDSysV3gYLbc4BzzXRkkkkk89a0f7CvB/zz/76o/sK8/6Z/wDfVOMVH4UBm0Vpf2Fef9M/
+++qP7CvP+mf/AH1VXAzaK0v7CvP+mf8A31R/YV5/0z/76ouBm10+i/8AINX6msr+w7z/AKZ/99Vt
+abbva2YikxuBJ4NAGHP/AK+T/eNFE/8Ar35H3jRXcjmLlveSW8YiCKcE8kmpf7XcceUv50UVEoRv
+sXFsP7Yf/nkv50n9sP8A88l/OiilyR7Duw/tiT/nkv50f2xJ/wA8l/Oiijkj2C7D+2JP+eS/nR/b
+En/PJfzooo5I9guw/tiT/nkv50f2xJ/zyX86KKOSPYLsP7Yk/wCeS/nR/bEn/PJfzooo5I9guw/t
+iT/nkv50f2xJ/wA8l/Oiijkj2C7F/th/+eS/nR/a7n/lkv50UUKEewXZmtJudjtHJooorexkf//Z]]></pic>
+</pictures>
+<category>
+<cat>Snacks</cat>
+<cat>Cookies &amp; Squares</cat>
+</category>
+<yield><amount><min>2</min><max>3</max></amount><type>dozen</type></yield>
+<preparation-time>00:30</preparation-time>
+</krecipes-description>
+<krecipes-ingredients>
+<ingredient-group name="Dry Ingredients">
+<ingredient>
+<name>granulated sugar</name>
+<amount><min>0.75</min><max>1</max></amount>
+<unit>c.</unit>
+</ingredient>
+<ingredient>
+<name>brown sugar</name>
+<amount>1</amount>
+<unit>c.</unit>
+</ingredient>
+<ingredient>
+<name>all-purpose flour</name>
+<amount>2</amount>
+<unit>c.</unit>
+</ingredient>
+<ingredient>
+<name>baking soda</name>
+<amount>1</amount>
+<unit>tsp.</unit>
+</ingredient>
+</ingredient-group>
+<ingredient-group name="Fat &amp; Liquids">
+<ingredient>
+<name>shortening</name>
+<amount>1</amount>
+<unit>c.</unit>
+<prep>softened,at room temperature</prep>
+</ingredient>
+<ingredient>
+<name>peanut butter</name>
+<amount>1</amount>
+<unit>c.</unit>
+</ingredient>
+<ingredient>
+<name>eggs</name>
+<amount>2</amount>
+<unit></unit>
+</ingredient>
+<ingredient>
+<name>vanilla extract</name>
+<amount>1</amount>
+<unit>tsp.</unit>
+</ingredient>
+</ingredient-group>
+<ingredient>
+ <name>a</name>
+ <amount>1</amount>
+ <unit>cup</unit>
+ <substitutes>
+ <ingredient>
+ <name>b</name>
+ <amount>2</amount>
+ <unit>cups</unit>
+ </ingredient>
+ <ingredient>
+ <name>c</name>
+ <amount>3</amount>
+ <unit>cups</unit>
+ </ingredient>
+ </substitutes>
+</ingredient>
+</krecipes-ingredients>
+<krecipes-instructions>
+Drop by spoonful on greased cookie sheet. Bake in moderate oven.</krecipes-instructions>
+<krecipes-ratings>
+ <rating>
+ <rater>George McFry</rater>
+ <comment>Good enough</comment>
+ <criterion>
+ <criteria>
+ <name>Taste</name>
+ <stars>5</stars>
+ </criteria>
+ </criterion>
+ </rating>
+ <rating>
+ <rater>Me</rater>
+ <comment>Yuck, don't eat!</comment>
+ <criterion>
+ <criteria>
+ <name>Overall</name>
+ <stars>2</stars>
+ </criteria>
+ <criteria>
+ <name>Taste</name>
+ <stars>1.5</stars>
+ </criteria>
+ </criterion>
+ </rating>
+</krecipes-ratings>
+</krecipes-recipe>
+<krecipes-recipe>
+<krecipes-description>
+<title>Cookies_Test</title>
+<author>Colleen Beamer</author>
+<author>Mona Beamer</author>
+<pictures>
+<pic format="JPEG" id="1"><![CDATA[/9j/4AAQSkZJRgABAQIAAAAAAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a
+HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy
+MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCACmAIMDASIA
+AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAA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W2j/ANlJpsLW2S2XG5gxyNwY87gDgHqO
+1Yq/DaK2uXey1m6ghPCRMgkCD05r03+wrvsI8f71J/Yd5jGI/wDvqumUIz+JXEmzi7LwVpVpc290
+4muLiHBDSysV3gYLbc4BzzXRkkkkk89a0f7CvB/zz/76o/sK8/6Z/wDfVOMVH4UBm0Vpf2Fef9M/
+++qP7CvP+mf/AH1VXAzaK0v7CvP+mf8A31R/YV5/0z/76ouBm10+i/8AINX6msr+w7z/AKZ/99Vt
+abbva2YikxuBJ4NAGHP/AK+T/eNFE/8Ar35H3jRXcjmLlveSW8YiCKcE8kmpf7XcceUv50UVEoRv
+sXFsP7Yf/nkv50n9sP8A88l/OiilyR7Duw/tiT/nkv50f2xJ/wA8l/Oiijkj2C7D+2JP+eS/nR/b
+En/PJfzooo5I9guw/tiT/nkv50f2xJ/zyX86KKOSPYLsP7Yk/wCeS/nR/bEn/PJfzooo5I9guw/t
+iT/nkv50f2xJ/wA8l/Oiijkj2C7F/th/+eS/nR/a7n/lkv50UUKEewXZmtJudjtHJooorexkf//Z]]></pic>
+</pictures>
+<category>
+<cat>Snacks</cat>
+<cat>Cookies &amp; Squares</cat>
+</category>
+<yield><amount><min>2</min><max>3</max></amount><type>dozen</type></yield>
+<preparation-time>00:30</preparation-time>
+</krecipes-description>
+<krecipes-ingredients>
+<ingredient-group name="Dry Ingredients">
+<ingredient>
+<name>granulated sugar</name>
+<amount><min>0.75</min><max>1</max></amount>
+<unit>c.</unit>
+</ingredient>
+<ingredient>
+<name>brown sugar</name>
+<amount>1</amount>
+<unit>c.</unit>
+</ingredient>
+<ingredient>
+<name>all-purpose flour</name>
+<amount>2</amount>
+<unit>c.</unit>
+</ingredient>
+<ingredient>
+<name>baking soda</name>
+<amount>1</amount>
+<unit>tsp.</unit>
+</ingredient>
+</ingredient-group>
+<ingredient-group name="Fat &amp; Liquids">
+<ingredient>
+<name>shortening</name>
+<amount>1</amount>
+<unit>c.</unit>
+<prep>softened,at room temperature</prep>
+</ingredient>
+<ingredient>
+<name>peanut butter</name>
+<amount>1</amount>
+<unit>c.</unit>
+</ingredient>
+<ingredient>
+<name>eggs</name>
+<amount>2</amount>
+<unit></unit>
+</ingredient>
+<ingredient>
+<name>vanilla extract</name>
+<amount>1</amount>
+<unit>tsp.</unit>
+</ingredient>
+</ingredient-group>
+<ingredient>
+ <name>a</name>
+ <amount>1</amount>
+ <unit>cup</unit>
+ <substitutes>
+ <ingredient>
+ <name>b</name>
+ <amount>2</amount>
+ <unit>cups</unit>
+ </ingredient>
+ <ingredient>
+ <name>c</name>
+ <amount>3</amount>
+ <unit>cups</unit>
+ </ingredient>
+ </substitutes>
+</ingredient>
+</krecipes-ingredients>
+<krecipes-instructions>
+Drop by spoonful on greased cookie sheet. Bake in moderate oven.</krecipes-instructions>
+<krecipes-ratings>
+ <rating>
+ <rater>George McFry</rater>
+ <comment>Good enough</comment>
+ <criterion>
+ <criteria>
+ <name>Taste</name>
+ <stars>5</stars>
+ </criteria>
+ </criterion>
+ </rating>
+ <rating>
+ <rater>Me</rater>
+ <comment>Yuck, don't eat!</comment>
+ <criterion>
+ <criteria>
+ <name>Overall</name>
+ <stars>2</stars>
+ </criteria>
+ <criteria>
+ <name>Taste</name>
+ <stars>1.5</stars>
+ </criteria>
+ </criterion>
+ </rating>
+</krecipes-ratings>
+</krecipes-recipe>
+</krecipes>
diff --git a/src/tests/mmftest.cpp b/src/tests/mmftest.cpp
new file mode 100644
index 0000000..453fcaa
--- /dev/null
+++ b/src/tests/mmftest.cpp
@@ -0,0 +1,139 @@
+/***************************************************************************
+* Copyright (C) 2005 by *
+* Jason Kivlighn ([email protected]) *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+***************************************************************************/
+
+#include <tdeapplication.h>
+
+#include <tqstring.h>
+
+#include <iostream>
+using std::cout;
+using std::endl;
+
+#include "mmfimporter.h"
+#include "mmfexporter.h"
+#include "importertest.h"
+#include "exportertest.h"
+
+int
+main(int argc, char *argv[])
+{
+ TDEApplication a(argc, argv, "mmftest");
+
+ printf("Creating MMFImporter.\n");
+ MMFImporter importer;
+
+ printf("Parsing mmftest.txt.\n");
+ TQStringList files; files << "mmftest.txt";
+ importer.parseFiles(files);
+
+ Recipe recipe;
+ recipe.title = "Cookies_Test";
+ recipe.yield.amount = 2;
+ recipe.yield.type = "servings";
+ recipe.categoryList.append( Element("Snacks",1) );
+ recipe.categoryList.append( Element("Cookies & Squares",2) );
+ recipe.instructions =
+ "Drop by spoonful on greased cookie sheet. Bake in moderate oven.";
+ recipe.prepTime = TQTime(0,30);
+
+ Ingredient ing9;
+ ing9.name = "a";
+ ing9.amount = 1;
+ ing9.amount_offset = 0;
+ ing9.units.name = "cup";
+ IngredientData ing9_1;
+ ing9_1.name = "b";
+ ing9_1.amount = 2;
+ ing9_1.amount_offset = 0;
+ ing9_1.units.plural = "cups";
+ IngredientData ing9_2;
+ ing9_2.name = "c";
+ ing9_2.amount = 3;
+ ing9_2.amount_offset = 0;
+ ing9_2.units.plural = "cups";
+ ing9.substitutes.append(ing9_1);
+ ing9.substitutes.append(ing9_2);
+ recipe.ingList.append( ing9 );
+
+ Ingredient ing2;
+ ing2.name = "c. granulated sugar";
+ ing2.amount = 0.75;
+ ing2.groupID = 0; ing2.group = "Dry Ingredients";
+ recipe.ingList.append( ing2 );
+
+ Ingredient ing;
+ ing.name = "c. brown sugar";
+ ing.amount = 1;
+ ing.amount_offset = 0;
+ ing.groupID = 0; ing.group = "Dry Ingredients";
+ recipe.ingList.append( ing );
+
+ Ingredient ing3;
+ ing3.name = "c. all-purpose flour";
+ ing3.amount = 2;
+ ing3.groupID = 0; ing3.group = "Dry Ingredients";
+ recipe.ingList.append( ing3 );
+
+ Ingredient ing4;
+ ing4.name = "tsp. baking soda";
+ ing4.amount = 1;
+ ing4.groupID = 0; ing4.group = "Dry Ingredients";
+ recipe.ingList.append( ing4 );
+
+ Ingredient ing8;
+ ing8.name = "c. shortening";
+ ing8.amount = 1;
+ ing8.prepMethodList.append( Element("softened") );
+ ing8.prepMethodList.append( Element("at room temperature") );
+ ing8.groupID = 1; ing8.group = "Fat & Liquids";
+ recipe.ingList.append( ing8 );
+
+ Ingredient ing6;
+ ing6.name = "c. peanut butter";
+ ing6.amount = 1;
+ ing6.groupID = 1; ing6.group = "Fat & Liquids";
+ recipe.ingList.append( ing6 );
+
+ Ingredient ing5;
+ ing5.name = "eggs";
+ ing5.amount = 2;
+ ing5.groupID = 1; ing5.group = "Fat & Liquids";
+ recipe.ingList.append( ing5 );
+
+ Ingredient ing7;
+ ing7.name = "tsp. vanilla extract";
+ ing7.amount = 1;
+ ing7.groupID = 1; ing7.group = "Fat & Liquids";
+ recipe.ingList.append( ing7 );
+
+
+ check( importer, recipe );
+
+ RecipeList recipeList;
+ recipeList.append(recipe);
+ recipeList.append(recipe);
+
+ printf("Creating MMFExporter.\n");
+ MMFExporter exporter("not needed",".mmf");
+ check( exporter, recipeList );
+ printf("Successfully exported recipes to test.txt.\n");
+
+ printf("Creating MMFImporter to test exported recipes.\n");
+ MMFImporter importer2;
+
+ printf("Parsing test.txt.\n");
+ TQStringList files2; files2 << "test.txt";
+ importer2.parseFiles(files2);
+ TQFile::remove("test.txt");
+ check( importer2, recipe );
+ printf("Recipe export successful.\n");
+
+ printf("*** MM format importer and exporter passed the tests :-) ***\n");
+}
diff --git a/src/tests/mmftest.txt b/src/tests/mmftest.txt
new file mode 100644
index 0000000..9d13af3
--- /dev/null
+++ b/src/tests/mmftest.txt
@@ -0,0 +1,49 @@
+----- Exported by Krecipes vSVN_PRE-0.9 [Meal-Master Export Format] -----
+
+ Title: Cookies_Test
+ Categories: Snacks, Cookies & Squares
+ Servings: 2
+
+ 1 c a, or
+ 2 c b, or
+ 3 c c
+------------------------------Dry Ingredients-------------------------------
+ 3/4 c. granulated sugar
+ 1 c. brown sugar
+ 2 c. all-purpose flour
+ 1 tsp. baking soda
+-------------------------------Fat & Liquids--------------------------------
+ 1 c. shortening; softened, at
+ -room temperature
+ 1 c. peanut butter
+ 2 eggs
+ 1 tsp. vanilla extract
+
+ Drop by spoonful on greased cookie sheet. Bake in moderate oven.
+
+-----
+
+----- Exported by Krecipes vSVN_PRE-0.9 [Meal-Master Export Format] -----
+
+ Title: Cookies_Test
+ Categories: Snacks, Cookies & Squares
+ Servings: 2
+
+ 1 c a, or
+ 2 c b, or
+ 3 c c
+------------------------------Dry Ingredients-------------------------------
+ 3/4 c. granulated sugar
+ 1 c. brown sugar
+ 2 c. all-purpose flour
+ 1 tsp. baking soda
+-------------------------------Fat & Liquids--------------------------------
+ 1 c. shortening; softened, at
+ -room temperature
+ 1 c. peanut butter
+ 2 eggs
+ 1 tsp. vanilla extract
+
+ Drop by spoonful on greased cookie sheet. Bake in moderate oven.
+
+-----
diff --git a/src/tests/mx2test.cpp b/src/tests/mx2test.cpp
new file mode 100644
index 0000000..daa379e
--- /dev/null
+++ b/src/tests/mx2test.cpp
@@ -0,0 +1,72 @@
+/***************************************************************************
+* Copyright (C) 2005 by *
+* Jason Kivlighn ([email protected]) *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+***************************************************************************/
+
+#include <tdeapplication.h>
+
+#include <tqstring.h>
+
+#include <iostream>
+using std::cout;
+using std::endl;
+
+#include "mx2importer.h"
+#include "importertest.h"
+
+int
+main(int argc, char *argv[])
+{
+ TDEApplication a(argc, argv, "mx2test");
+
+ printf("Creating MX2Importer.\n");
+ MX2Importer importer;
+
+ printf("Parsing mx2test.txt.\n");
+ TQStringList files; files << "mx2test.txt";
+ importer.parseFiles(files);
+
+ Recipe recipe;
+ recipe.title = "Title 1";
+ recipe.yield.amount = 2;
+ recipe.yield.type = "servings";
+ recipe.categoryList.append( Element("Category 1") );
+ recipe.categoryList.append( Element("Category 2") );
+ recipe.instructions =
+ "Instruction line 1\n"
+ "Instruction line 2\n"
+ "Instruction line 3";
+
+ Ingredient ing;
+ ing.name = "ingredient 1";
+ ing.amount = 1;
+ ing.units.name = "teaspoon";
+ recipe.ingList.append( ing );
+
+ Ingredient ing2;
+ ing2.name = "ingredient 2";
+ ing2.amount = 3.5;
+ ing2.units.plural = TQString::null;
+ recipe.ingList.append( ing2 );
+
+ Ingredient ing3;
+ ing3.name = "ingredient 3";
+ ing3.amount = 3.5;
+ ing3.units.plural = "ounces";
+ recipe.ingList.append( ing3 );
+
+ Ingredient ing4;
+ ing4.name = "ingredient 4";
+ ing4.amount = 3.5;
+ ing4.units.plural = "ounces";
+ recipe.ingList.append( ing4 );
+
+ check( importer, recipe );
+
+ printf("Done.\n");
+}
diff --git a/src/tests/mx2test.txt b/src/tests/mx2test.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/tests/mx2test.txt
diff --git a/src/tests/mxptest.cpp b/src/tests/mxptest.cpp
new file mode 100644
index 0000000..3c56a6f
--- /dev/null
+++ b/src/tests/mxptest.cpp
@@ -0,0 +1,72 @@
+/***************************************************************************
+* Copyright (C) 2005 by *
+* Jason Kivlighn ([email protected]) *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+***************************************************************************/
+
+#include <tdeapplication.h>
+
+#include <tqstring.h>
+
+#include <iostream>
+using std::cout;
+using std::endl;
+
+#include "mxpimporter.h"
+#include "importertest.h"
+
+int
+main(int argc, char *argv[])
+{
+ TDEApplication a(argc, argv, "mxptest");
+
+ printf("Creating MXPImporter.\n");
+ MXPImporter importer;
+
+ printf("Parsing mxptest.txt.\n");
+ TQStringList files; files << "mxptest.txt";
+ importer.parseFiles(files);
+
+ Recipe recipe;
+ recipe.title = "Title 1";
+ recipe.yield.amount = 2;
+ recipe.yield.type = "servings";
+ recipe.categoryList.append( Element("Category 1") );
+ recipe.categoryList.append( Element("Category 2") );
+ recipe.instructions =
+ "Instruction line 1\n"
+ "Instruction line 2\n"
+ "Instruction line 3";
+
+ Ingredient ing;
+ ing.name = "ingredient 1";
+ ing.amount = 1;
+ ing.units.name = "teaspoon";
+ recipe.ingList.append( ing );
+
+ Ingredient ing2;
+ ing2.name = "ingredient 2";
+ ing2.amount = 3.5;
+ ing2.units.plural = TQString::null;
+ recipe.ingList.append( ing2 );
+
+ Ingredient ing3;
+ ing3.name = "ingredient 3";
+ ing3.amount = 3.5;
+ ing3.units.plural = "ounces";
+ recipe.ingList.append( ing3 );
+
+ Ingredient ing4;
+ ing4.name = "ingredient 4";
+ ing4.amount = 3.5;
+ ing4.units.plural = "ounces";
+ recipe.ingList.append( ing4 );
+
+ check( importer, recipe );
+
+ printf("Done.\n");
+}
diff --git a/src/tests/mxptest.txt b/src/tests/mxptest.txt
new file mode 100644
index 0000000..46154c0
--- /dev/null
+++ b/src/tests/mxptest.txt
@@ -0,0 +1,25 @@
+ ----- Exported by Krecipes vSVN_PRE-0.9 [Master Cook Export Format] -----
+
+ Cookies Test
+
+Recipe By : Mona Beamer, Colleen Beamer
+Serving Size : 2 Preparation Time :0:45
+Categories : Snacks Cookies & Squares
+
+
+ Amount Measure Ingredient -- Preparation Method
+-------- ------------ --------------------------------
+ 3/4 c. granulated sugar
+ 1 c. brown sugar
+ 2 c. all-purpose flour
+ 1 tsp. baking soda
+ 1 c. shortening -- softened,at room temperature
+ 1 c. peanut butter
+ 2 eggs
+ 1 tsp. vanilla extract
+
+
+Drop by spoonful on greased cookie sheet. Bake in moderate oven.
+
+Nutr. Assoc. : 0 1374 1021 927 0 1638 1358 797 0 0 0 568 0 532 1611
+
diff --git a/src/tests/nyctest.cpp b/src/tests/nyctest.cpp
new file mode 100644
index 0000000..724b6a0
--- /dev/null
+++ b/src/tests/nyctest.cpp
@@ -0,0 +1,100 @@
+/***************************************************************************
+* Copyright (C) 2005 by *
+* Jason Kivlighn ([email protected]) *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+***************************************************************************/
+
+#include <tdeapplication.h>
+
+#include <tqstring.h>
+
+#include <iostream>
+using std::cout;
+using std::endl;
+
+#include "nycgenericimporter.h"
+#include "importertest.h"
+
+int
+main(int argc, char *argv[])
+{
+ TDEApplication a(argc, argv, "nyctest");
+
+ printf("Creating NYCGenericImporter.\n");
+ NYCGenericImporter importer;
+
+ printf("Parsing nyctest.txt.\n");
+ TQStringList files; files << "nyctest.txt";
+ importer.parseFiles(files);
+
+ Recipe recipe;
+ recipe.title = "Cookies_Test";
+ recipe.yield.amount = 2;
+ recipe.yield.type = "dozen";
+ recipe.categoryList.append( Element("Snacks",1) );
+ recipe.categoryList.append( Element("Cookies & Squares",2) );
+ recipe.instructions =
+ "Drop by spoonful on greased cookie sheet. Bake in moderate oven.";
+ //recipe.prepTime = TQTime(0,30);
+
+ recipe.authorList.append( Element("Colleen Beamer") );
+
+ Ingredient ing;
+ ing.name = "granulated sugar";
+ ing.amount = 0.75;
+ ing.units.name = "c.";
+ recipe.ingList.append( ing );
+
+ Ingredient ing2;
+ ing2.name = "brown sugar";
+ ing2.amount = 1;
+ ing2.units.name = "c.";
+ recipe.ingList.append( ing2 );
+
+ Ingredient ing3;
+ ing3.name = "all-purpose flour";
+ ing3.amount = 2;
+ ing3.units.plural = "c.";
+ recipe.ingList.append( ing3 );
+
+ Ingredient ing4;
+ ing4.name = "baking soda";
+ ing4.amount = 1;
+ ing4.units.name = "tsp.";
+ recipe.ingList.append( ing4 );
+
+ Ingredient ing8;
+ ing8.name = "shortening";
+ ing8.amount = 1;
+ ing8.units.name = "c.";
+ ing8.prepMethodList.append( Element("softened") );
+ ing8.prepMethodList.append( Element("at room temperature") );
+ recipe.ingList.append( ing8 );
+
+ Ingredient ing6;
+ ing6.name = "peanut butter";
+ ing6.amount = 1;
+ ing6.units.name = "c.";
+ recipe.ingList.append( ing6 );
+
+ Ingredient ing5;
+ ing5.name = "eggs";
+ ing5.amount = 2;
+ ing5.units.plural = "whole";
+ recipe.ingList.append( ing5 );
+
+ Ingredient ing7;
+ ing7.name = "vanilla extract";
+ ing7.amount = 1;
+ ing7.units.name = "tsp.";
+
+ recipe.ingList.append( ing7 );
+
+ check( importer, recipe );
+
+ printf("Done.\n");
+}
diff --git a/src/tests/nyctest.txt b/src/tests/nyctest.txt
new file mode 100644
index 0000000..ad0720b
--- /dev/null
+++ b/src/tests/nyctest.txt
@@ -0,0 +1,57 @@
+@@@@@ Exported by Krecipes vSVN_PRE-0.9 [Now You're Cooking! Export Format]
+
+Cookies_Test
+
+Snacks, Cookies & Squares
+
+3/4 c. granulated sugar
+1 c. brown sugar
+2 c. all-purpose flour
+1 tsp. baking soda
+1 c. shortening -- softened,at room temperature
+1 c. peanut butter
+2 whole eggs
+1 tsp. vanilla extract
+
+Drop by spoonful on greased cookie sheet. Bake in moderate oven.
+
+NYC Nutrition Analysis (per serving or yield unit): water=70.33 g; calories=394.5; protein=3.14 g; total fat=18 g; carbohydrate=56.94 g; dietary fiber=3.57 g; ash=1.18 g; calcium=14.36 mg; phosphorus=37.48 mg; iron=1.59 mg; sodium=339.7 mg; potassium=111.7 mg; magnesium=10.26 mg; zinc=0.25 mg; copper=0.08 mg; manganese=0.32 mg; vitamin A=160.3 IU; vitamin E=1.43 mg ATE; thiamin=0.2 mg; riboflavin=0.14 mg; niacin=1.6 mg; pantothenic acid=0.13 mg; vitamin B6=0.04 mg; folate=35.9 ug; vitamin C=4.13 mg; saturated fat=5.77 g; monounsaturated fat=6.83 g; polyunsaturated fat=4.41 g; caffeine=1.16 mg; selenium=10.13 ug; refuse=3.34%; %cal as carb:prot:fat=57:3:40; WW Pts=8.7; (complete analysis)
+
+Contributor: Colleen Beamer
+
+Yield: 2 dozen
+
+NYC Nutrilink: N5504^19335,N193^02021,N182^02010,N197^02025
+NYC Nutrilink: N218^02047,N5662^20081,N3906^14355,N1896^09153
+NYC Nutrilink: N1766^09003,N599^04522,U3^18402
+
+** Exported from Now You're Cooking! v5.64 **
+
+@@@@@ Exported by Krecipes vSVN_PRE-0.9 [Now You're Cooking! Export Format]
+
+Cookies_Test
+
+Snacks, Cookies & Squares
+
+3/4 c. granulated sugar
+1 c. brown sugar
+2 c. all-purpose flour
+1 tsp. baking soda
+1 c. shortening -- softened,at room temperature
+1 c. peanut butter
+2 whole eggs
+1 tsp. vanilla extract
+
+Drop by spoonful on greased cookie sheet. Bake in moderate oven.
+
+NYC Nutrition Analysis (per serving or yield unit): water=70.33 g; calories=394.5; protein=3.14 g; total fat=18 g; carbohydrate=56.94 g; dietary fiber=3.57 g; ash=1.18 g; calcium=14.36 mg; phosphorus=37.48 mg; iron=1.59 mg; sodium=339.7 mg; potassium=111.7 mg; magnesium=10.26 mg; zinc=0.25 mg; copper=0.08 mg; manganese=0.32 mg; vitamin A=160.3 IU; vitamin E=1.43 mg ATE; thiamin=0.2 mg; riboflavin=0.14 mg; niacin=1.6 mg; pantothenic acid=0.13 mg; vitamin B6=0.04 mg; folate=35.9 ug; vitamin C=4.13 mg; saturated fat=5.77 g; monounsaturated fat=6.83 g; polyunsaturated fat=4.41 g; caffeine=1.16 mg; selenium=10.13 ug; refuse=3.34%; %cal as carb:prot:fat=57:3:40; WW Pts=8.7; (complete analysis)
+
+Contributor: Colleen Beamer
+
+Yield: 2 dozen
+
+NYC Nutrilink: N5504^19335,N193^02021,N182^02010,N197^02025
+NYC Nutrilink: N218^02047,N5662^20081,N3906^14355,N1896^09153
+NYC Nutrilink: N1766^09003,N599^04522,U3^18402
+
+** Exported from Now You're Cooking! v5.64 ** \ No newline at end of file
diff --git a/src/tests/recipemltest.cpp b/src/tests/recipemltest.cpp
new file mode 100644
index 0000000..eb11880
--- /dev/null
+++ b/src/tests/recipemltest.cpp
@@ -0,0 +1,158 @@
+/***************************************************************************
+* Copyright (C) 2005 by *
+* Jason Kivlighn ([email protected]) *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+***************************************************************************/
+
+#include <tdeapplication.h>
+
+#include <tqstring.h>
+
+#include <iostream>
+using std::cout;
+using std::endl;
+
+#include "recipemlimporter.h"
+#include "recipemlexporter.h"
+#include "importertest.h"
+#include "exportertest.h"
+
+int
+main(int argc, char *argv[])
+{
+ TDEApplication a(argc, argv, "recipemltest");
+
+ printf("Creating RecipeMLImporter.\n");
+ RecipeMLImporter importer;
+
+ printf("Parsing recipemltest.txt.\n");
+ TQStringList files; files << "recipemltest.txt";
+ importer.parseFiles(files);
+
+ Recipe recipe;
+ recipe.title = "Cookies_Test";
+ recipe.yield.amount = 2;
+ recipe.yield.amount_offset = 1;
+ recipe.yield.type = "dozen";
+ recipe.categoryList.append( Element("Snacks",1) );
+ recipe.categoryList.append( Element("Cookies & Squares",2) );
+ recipe.instructions =
+ "Drop by spoonful on greased cookie sheet. Bake in moderate oven.";
+ recipe.prepTime = TQTime(0,30);
+
+ recipe.authorList.append( Element("Colleen Beamer") );
+ recipe.authorList.append( Element("Mona Beamer") );
+
+ Ingredient ing;
+ ing.name = "granulated sugar";
+ ing.amount = 0.75;
+ ing.amount_offset = 0.25;
+ ing.units.name = "c.";
+ ing.groupID = 0; ing.group = "Dry Ingredients";
+ recipe.ingList.append( ing );
+
+ Ingredient ing2;
+ ing2.name = "brown sugar";
+ ing2.amount = 1;
+ ing2.amount_offset = 0;
+ ing2.units.name = "c.";
+ ing2.groupID = 0; ing2.group = "Dry Ingredients";
+ recipe.ingList.append( ing2 );
+
+ Ingredient ing3;
+ ing3.name = "all-purpose flour";
+ ing3.amount = 2;
+ ing3.units.plural = "c.";
+ ing3.groupID = 0; ing3.group = "Dry Ingredients";
+ recipe.ingList.append( ing3 );
+
+ Ingredient ing4;
+ ing4.name = "baking soda";
+ ing4.amount = 1;
+ ing4.amount_offset = 0;
+ ing4.units.name = "tsp.";
+ ing4.groupID = 0; ing4.group = "Dry Ingredients";
+ recipe.ingList.append( ing4 );
+
+ Ingredient ing8;
+ ing8.name = "shortening";
+ ing8.amount = 1;
+ ing8.amount_offset = 0;
+ ing8.units.name = "c.";
+ ing8.prepMethodList.append( Element("softened") );
+ ing8.prepMethodList.append( Element("at room temperature") );
+ ing8.groupID = 1; ing8.group = "Fat & Liquids";
+ recipe.ingList.append( ing8 );
+
+ Ingredient ing6;
+ ing6.name = "peanut butter";
+ ing6.amount = 1;
+ ing6.amount_offset = 0;
+ ing6.units.name = "c.";
+ ing6.groupID = 1; ing6.group = "Fat & Liquids";
+ recipe.ingList.append( ing6 );
+
+ Ingredient ing5;
+ ing5.name = "eggs";
+ ing5.amount = 2;
+ ing5.amount_offset = 0;
+ ing5.units.plural = "";
+ ing5.groupID = 1; ing5.group = "Fat & Liquids";
+ recipe.ingList.append( ing5 );
+
+ Ingredient ing7;
+ ing7.name = "vanilla extract";
+ ing7.amount = 1;
+ ing7.amount_offset = 0;
+ ing7.units.name = "tsp.";
+ ing7.groupID = 1; ing7.group = "Fat & Liquids";
+ recipe.ingList.append( ing7 );
+
+ Ingredient ing9;
+ ing9.name = "a";
+ ing9.amount = 1;
+ ing9.amount_offset = 0;
+ ing9.units.name = "cup";
+ IngredientData ing9_1;
+ ing9_1.name = "b";
+ ing9_1.amount = 2;
+ ing9_1.amount_offset = 0;
+ ing9_1.units.plural = "cups";
+ IngredientData ing9_2;
+ ing9_2.name = "c";
+ ing9_2.amount = 3;
+ ing9_2.amount_offset = 0;
+ ing9_2.units.plural = "cups";
+ ing9.substitutes.append(ing9_1);
+ ing9.substitutes.append(ing9_2);
+ recipe.ingList.append( ing9 );
+
+ check( importer, recipe );
+
+ RecipeList recipeList;
+ recipeList.append(recipe);
+ recipeList.append(recipe);
+
+ printf("Creating RecipeMLExporter.\n");
+ RecipeMLExporter exporter("not needed",".mmf");
+ check( exporter, recipeList );
+ printf("Successfully exported recipes to test.txt.\n");
+
+ printf("Creating RecipeMLImporter to test exported recipes.\n");
+ RecipeMLImporter importer2;
+
+ printf("Parsing test.txt.\n");
+ TQStringList files2; files2 << "test.txt";
+ importer2.parseFiles(files2);
+ TQFile::remove("test.txt");
+ check( importer2, recipe );
+ printf("Recipe export successful.\n");
+
+ printf("*** RecipeML importer and exporter passed the tests :-) ***\n");
+
+ printf("Done.\n");
+}
diff --git a/src/tests/recipemltest.txt b/src/tests/recipemltest.txt
new file mode 100644
index 0000000..330f757
--- /dev/null
+++ b/src/tests/recipemltest.txt
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE recipeml PUBLIC "-//FormatData//DTD RecipeML 0.5//EN" "http://www.formatdata.com/recipeml/recipeml.dtd"><recipeml version="0.5" generator="Krecipes vSVN_PRE-0.9">
+<recipe>
+ <head>
+ <title>Cookies_Test</title>
+ <source>
+ <srcitem>Colleen Beamer</srcitem>
+ <srcitem>Mona Beamer</srcitem>
+ </source>
+ <categories>
+ <cat>Snacks</cat>
+ <cat>Cookies &amp; Squares</cat>
+ </categories>
+ <yield>
+ <range>
+ <q1>2</q1>
+ <q2>3</q2>
+ </range>
+ <unit>dozen</unit>
+ </yield>
+ <preptime type="Total" >
+ <time>
+ <qty>30</qty>
+ <timeunit>minutes</timeunit>
+ </time>
+ </preptime>
+ </head>
+ <ingredients>
+ <ing-div>
+ <title>Dry Ingredients</title>
+ <ing>
+ <amt>
+ <qty>
+ <range>
+ <q1>0.75</q1>
+ <q2>1</q2>
+ </range>
+ </qty>
+ <unit>c.</unit>
+ </amt>
+ <item>granulated sugar</item>
+ </ing>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>c.</unit>
+ </amt>
+ <item>brown sugar</item>
+ </ing>
+ <ing>
+ <amt>
+ <qty>2</qty>
+ <unit>c.</unit>
+ </amt>
+ <item>all-purpose flour</item>
+ </ing>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>tsp.</unit>
+ </amt>
+ <item>baking soda</item>
+ </ing>
+ </ing-div>
+ <ing-div>
+ <title>Fat &amp; Liquids</title>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>c.</unit>
+ </amt>
+ <item>shortening</item>
+ <prep>softened,at room temperature</prep>
+ </ing>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>c.</unit>
+ </amt>
+ <item>peanut butter</item>
+ </ing>
+ <ing>
+ <amt>
+ <qty>2</qty>
+ <unit></unit>
+ </amt>
+ <item>eggs</item>
+ </ing>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>tsp.</unit>
+ </amt>
+ <item>vanilla extract</item>
+ </ing>
+ </ing-div>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>cup</unit>
+ </amt>
+ <item>a</item>
+ <prep></prep>
+ <alt-ing>
+ <amt>
+ <qty>2</qty>
+ <unit>cups</unit>
+ </amt>
+ <item>b</item>
+ <prep></prep>
+ </alt-ing>
+ <alt-ing>
+ <amt>
+ <qty>3</qty>
+ <unit>cups</unit>
+ </amt>
+ <item>c</item>
+ <prep></prep>
+ </alt-ing>
+ </ing>
+ </ingredients>
+ <directions>
+ <step>Drop by spoonful on greased cookie sheet. Bake in moderate oven.</step>
+ </directions>
+</recipe>
+<recipe>
+ <head>
+ <title>Cookies_Test</title>
+ <source>
+ <srcitem>Colleen Beamer</srcitem>
+ <srcitem>Mona Beamer</srcitem>
+ </source>
+ <categories>
+ <cat>Snacks</cat>
+ <cat>Cookies &amp; Squares</cat>
+ </categories>
+ <yield>
+ <range>
+ <q1>2</q1>
+ <q2>3</q2>
+ </range>
+ <unit>dozen</unit>
+ </yield>
+ <preptime type="Total" >
+ <time>
+ <qty>30</qty>
+ <timeunit>minutes</timeunit>
+ </time>
+ </preptime>
+ </head>
+ <ingredients>
+ <ing-div>
+ <title>Dry Ingredients</title>
+ <ing>
+ <amt>
+ <qty>
+ <range>
+ <q1>0.75</q1>
+ <q2>1</q2>
+ </range>
+ </qty>
+ <unit>c.</unit>
+ </amt>
+ <item>granulated sugar</item>
+ </ing>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>c.</unit>
+ </amt>
+ <item>brown sugar</item>
+ </ing>
+ <ing>
+ <amt>
+ <qty>2</qty>
+ <unit>c.</unit>
+ </amt>
+ <item>all-purpose flour</item>
+ </ing>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>tsp.</unit>
+ </amt>
+ <item>baking soda</item>
+ </ing>
+ </ing-div>
+ <ing-div>
+ <title>Fat &amp; Liquids</title>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>c.</unit>
+ </amt>
+ <item>shortening</item>
+ <prep>softened,at room temperature</prep>
+ </ing>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>c.</unit>
+ </amt>
+ <item>peanut butter</item>
+ </ing>
+ <ing>
+ <amt>
+ <qty>2</qty>
+ <unit></unit>
+ </amt>
+ <item>eggs</item>
+ </ing>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>tsp.</unit>
+ </amt>
+ <item>vanilla extract</item>
+ </ing>
+ </ing-div>
+ <ing>
+ <amt>
+ <qty>1</qty>
+ <unit>cup</unit>
+ </amt>
+ <item>a</item>
+ <prep></prep>
+ <alt-ing>
+ <amt>
+ <qty>2</qty>
+ <unit>cups</unit>
+ </amt>
+ <item>b</item>
+ <prep></prep>
+ </alt-ing>
+ <alt-ing>
+ <amt>
+ <qty>3</qty>
+ <unit>cups</unit>
+ </amt>
+ <item>c</item>
+ <prep></prep>
+ </alt-ing>
+ </ing>
+ </ingredients>
+ <directions>
+ <step>Drop by spoonful on greased cookie sheet. Bake in moderate oven.</step>
+ </directions>
+</recipe>
+</recipeml> \ No newline at end of file
diff --git a/src/tests/rezkonvtest.cpp b/src/tests/rezkonvtest.cpp
new file mode 100644
index 0000000..d9b8022
--- /dev/null
+++ b/src/tests/rezkonvtest.cpp
@@ -0,0 +1,155 @@
+/***************************************************************************
+* Copyright (C) 2005 by *
+* Jason Kivlighn ([email protected]) *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+***************************************************************************/
+
+#include <tdeapplication.h>
+
+#include <tqstring.h>
+
+#include <iostream>
+using std::cout;
+using std::endl;
+
+#include "rezkonvimporter.h"
+#include "rezkonvexporter.h"
+#include "importertest.h"
+#include "exportertest.h"
+
+int
+main(int argc, char *argv[])
+{
+ TDEApplication a(argc, argv, "rezkonvtest");
+
+ printf("Creating RezkonvImporter.\n");
+ RezkonvImporter importer;
+
+ printf("Parsing rezkonvtest.txt.\n");
+ TQStringList files; files << "rezkonvtest.txt";
+ importer.parseFiles(files);
+
+ Recipe recipe;
+ recipe.title = "Cookies_Test";
+ recipe.yield.amount = 2;
+ recipe.yield.amount_offset = 1;
+ recipe.yield.type = "dozen";
+ recipe.categoryList.append( Element("Snacks") );
+ recipe.categoryList.append( Element("Cookies & Squares") );
+ recipe.instructions =
+ "\n\nDrop by spoonful on greased cookie sheet. Bake in moderate oven.";
+
+ recipe.authorList.append( Element("Mona Beamer") );
+ recipe.authorList.append( Element("Colleen Beamer") );
+
+ Ingredient ing9;
+ ing9.name = "a";
+ ing9.amount = 1;
+ ing9.amount_offset = 0;
+ ing9.units.name = "cup";
+ IngredientData ing9_1;
+ ing9_1.name = "b";
+ ing9_1.amount = 2;
+ ing9_1.amount_offset = 0;
+ ing9_1.units.plural = "cups";
+ IngredientData ing9_2;
+ ing9_2.name = "c";
+ ing9_2.amount = 3;
+ ing9_2.amount_offset = 0;
+ ing9_2.units.plural = "cups";
+ ing9.substitutes.append(ing9_1);
+ ing9.substitutes.append(ing9_2);
+ recipe.ingList.append( ing9 );
+
+ Ingredient ing;
+ ing.name = "granulated sugar";
+ ing.amount = 0.75;
+ ing.amount_offset = 0.25;
+ ing.units.name = "c.";
+ ing.groupID = 0; ing.group = "Dry Ingredients";
+ recipe.ingList.append( ing );
+
+ Ingredient ing2;
+ ing2.name = "brown sugar";
+ ing2.amount = 1;
+ ing2.amount_offset = 0;
+ ing2.units.name = "c.";
+ ing2.groupID = 0; ing2.group = "Dry Ingredients";
+ recipe.ingList.append( ing2 );
+
+ Ingredient ing3;
+ ing3.name = "all-purpose flour";
+ ing3.amount = 2;
+ ing3.units.plural = "c.";
+ ing3.groupID = 0; ing3.group = "Dry Ingredients";
+ recipe.ingList.append( ing3 );
+
+ Ingredient ing4;
+ ing4.name = "baking soda";
+ ing4.amount = 1;
+ ing4.amount_offset = 0;
+ ing4.units.name = "tsp.";
+ ing4.groupID = 0; ing4.group = "Dry Ingredients";
+ recipe.ingList.append( ing4 );
+
+ Ingredient ing8;
+ ing8.name = "shortening";
+ ing8.amount = 1;
+ ing8.amount_offset = 0;
+ ing8.units.name = "c.";
+ ing8.prepMethodList.append( Element("softened") );
+ ing8.prepMethodList.append( Element("at room temperature") );
+ ing8.groupID = 1; ing8.group = "Fat & Liquids";
+ recipe.ingList.append( ing8 );
+
+ Ingredient ing6;
+ ing6.name = "peanut butter";
+ ing6.amount = 1;
+ ing6.amount_offset = 0;
+ ing6.units.name = "c.";
+ ing6.groupID = 1; ing6.group = "Fat & Liquids";
+ recipe.ingList.append( ing6 );
+
+ Ingredient ing5;
+ ing5.name = "eggs";
+ ing5.amount = 2;
+ ing5.amount_offset = 0;
+ ing5.units.plural = "";
+ ing5.groupID = 1; ing5.group = "Fat & Liquids";
+ recipe.ingList.append( ing5 );
+
+ Ingredient ing7;
+ ing7.name = "vanilla extract";
+ ing7.amount = 1;
+ ing7.amount_offset = 0;
+ ing7.units.name = "tsp.";
+ ing7.groupID = 1; ing7.group = "Fat & Liquids";
+ recipe.ingList.append( ing7 );
+
+ check( importer, recipe );
+
+ RecipeList recipeList;
+ recipeList.append(recipe);
+ recipeList.append(recipe);
+
+ printf("Creating RezkonvExporter.\n");
+ RezkonvExporter exporter("not needed",".rk");
+ check( exporter, recipeList );
+ printf("Successfully exported recipes to test.txt.\n");
+
+ printf("Creating RezkonvImporter to test exported recipes.\n");
+ RezkonvImporter importer2;
+
+ printf("Parsing test.txt.\n");
+ TQStringList files2; files2 << "test.txt";
+ importer2.parseFiles(files2);
+ TQFile::remove("test.txt");
+ check( importer2, recipe );
+ printf("Recipe export successful.\n");
+
+ printf("Done.\n");
+}
diff --git a/src/tests/rezkonvtest.txt b/src/tests/rezkonvtest.txt
new file mode 100644
index 0000000..38e4ac2
--- /dev/null
+++ b/src/tests/rezkonvtest.txt
@@ -0,0 +1,55 @@
+========== REZKONV-Rezept - RezkonvSuite v0.97.1
+
+ Titel: Cookies_Test
+Kategorien: Snacks, Cookies & Squares
+ Menge: 2-3 dozen
+
+ 1 cup a, or
+ 2 cups b, or
+ 3 cups c
+========================== Dry Ingredients ==========================
+ 3/4-1 c. granulated sugar
+ 1 c. brown sugar
+ 2 c. all-purpose flour
+ 1 tsp. baking soda
+
+=========================== Fat & Liquids ===========================
+ 1 c. shortening, softened,at room temperature
+ 1 c. peanut butter
+ 2 eggs
+ 1 tsp. vanilla extract
+
+============================== QUELLE ==============================
+ Mona Beamer
+ -- Colleen Beamer
+
+Drop by spoonful on greased cookie sheet. Bake in moderate oven.
+=====
+
+========== REZKONV-Rezept - RezkonvSuite v0.97.1
+
+ Titel: Cookies_Test
+Kategorien: Snacks, Cookies & Squares
+ Menge: 2-3 dozen
+
+ 1 cup a, or
+ 2 cups b, or
+ 3 cups c
+========================== Dry Ingredients ==========================
+ 3/4-1 c. granulated sugar
+ 1 c. brown sugar
+ 2 c. all-purpose flour
+ 1 tsp. baking soda
+
+=========================== Fat & Liquids ===========================
+ 1 c. shortening, softened,at room temperature
+ 1 c. peanut butter
+ 2 eggs
+ 1 tsp. vanilla extract
+
+============================== QUELLE ==============================
+ Mona Beamer
+ -- Colleen Beamer
+
+Drop by spoonful on greased cookie sheet. Bake in moderate oven.
+=====
diff --git a/src/tests/test_photo.jpg b/src/tests/test_photo.jpg
new file mode 100644
index 0000000..3ebe035
--- /dev/null
+++ b/src/tests/test_photo.jpg
Binary files differ