#
# =============================================================================
#
# contains all of the test data suites.
#
# =============================================================================
#

#
#  a fairly standard upload
#
#  TD.1
#
## 1_type=item;    1_field=Name;        1_attr=cu; 1_clean=alsdn
## 2_type=stock;   2_field=Price;       2_attr=c;  2_clean=number
## 3_type=item;    3_field=Description; 3_attr=c
## 4_type=dim;     4_dim=Versions;      4_attr=c
## 4_split=,;      4_matrix=New Uinta Products
## 1_ignorestr=hi; 1_ignoretype=i

Name 1	1.00	Desc 1	v1.1,v1.2,v1.3,v1.4
Name 2	2.00	Desc 2	v2.1,v2.2,v2.3,v2.4,v2.5
Name 3	3.00	Desc 3	v3.1,v3.2
High	4.00	Desc 4	v4.1,v4.2,v4.3


#
#  This will select all of the items on the 'Potpourri' page, and create
#  a dimension for each.  It will wipe out any existing variations for
#  each product.
#
#  TD.2
#
## 1_type=page; 1_field=Name;  1_attr=s
## 2_type=dim;  2_dim=Flexes;  2_attr=c; 2_split=,; 2_matrix=New Uinta Products

Potpourri	regular,light,firm,stiff



#
#  creates (or updates) a bunch of cars, and puts them on the Cars Page
#
#  TD.3
#
## 1_type=page; 1_field=Name;         1_attr=mc
## 2_type=item; 2_field=Name;         2_attr=mc
## 3_type=item; 3_field=Wheels;       3_attr=c 
## 4_type=item; 4_field=Transmission; 4_attr=c

Cars Page	Big Blue Car	4 wheels	standard
Cars Page	Small Red Car	4 wheels	standard
Cars Page	Old Green Car	3 wheels	automatic


#
# this will put all items that have a 'Color' equal to 'red' into the 'red' 
# page
#
# TD.4
#
## 1_type=item; 1_field=Color; 1_attr=m
## 2_type=page; 2_field=Name;  2_attr=mc

Red color    Red page



#
# this will update the price of all items in group A to 15.
# because the 'create' option is not specified, if nothing matches,
# no item will be created.
#
# TD.5
#
## 1_type=group; 1_field=Name;  1_attr=s
## 2_type=stock; 2_field=Price; 2_attr=u

A	15.00

#
# this will copy all of the items in group A to group B
#
# TD.6
#
## 1_type=group; 1_field=Name; 1_attr=s
## 2_type=group; 2_field=Name; 2_attr=m

A	B


#
# this will update the weight of all variants of the 'hohum' item to 3.
# if the item 'hohum' doesn't exist, it will be created (as a simple item),
# and its weight will be set to 3.
#
# TD.7
#
## 1_type=item;  1_field=Name;   1_attr=mc
## 2_type=stock; 2_field=Weight; 2_attr=c

hohum	3

#
# this will update or create specific variants
#
# TD.8
#
## 1_type=item;  1_attr=mc; 1_field=Name
## 2_type=range; 2_attr=c;  2_dim=Color;    2_matrix=Standard matrix
## 3_type=range; 3_attr=c;  3_dim=Size;     3_matrix=Standard matrix
## 4_type=range; 4_attr=c;  4_dim=Dampness; 4_matrix=Standard matrix
## 5_type=stock; 5_attr=u;  5_field=Price

hohum	red	small	wet	12.00
hohum	red	small	damp	12.00
hohum	red	small	dry	12.00
hohum	blue	small	wet	13.00
hohum	blue	small	damp	13.00
hohum	blue	small	dry	13.00



#
# this will update all variants of all items that are 'red' and 'small' to a 
# weight of 2.25.  If nothing matches, nothing is (or can be) created.
#
# TD.9
#
## 1_type=range; 1_attr=m; 1_dim=Color;   1_matrix=Standard matrix
## 2_type=range; 2_attr=m; 2_dim=Size;    2_matrix=Standard matrix
## 3_type=stock; 3_attr=u; 3_field=Weight
red	small	2.00
red	medium	3.00
red	large	4.00

blue	small	2.25
blue	medium	3.25
blue	large	4.25


#
# this will update all variants of all items that have the specified
# attributes to an appropriate description.
# If nothing matches, nothing is (or can be) created.
#
# TD.10
#
## 1_type=range; 1_attr=m; 1_dim=Color; 1_matrix=Standard matrix
## 2_type=range; 2_attr=m; 2_dim=Size;  2_matrix=Standard matrix
## 3_type=item;  3_attr=c; 3_field=Description
red	small	Red and small!
red	medium	Red and medium!
red	large	Huge!  Like an orange on a toothpick!  And red, too!

#
# this will create an item called 'hohum,' and a matrix to go with it.
# it will create two dimensions, and (3*3=9) variants (representing a 
# fully populated matrix).  Each variant will have 4208 as an sku, 
# and a price of 12.00
#
# TD.11
#
## 1_type=item;  1_attr=mc; 1_field=Name
## 2_type=dim;   2_attr=c;  2_dim=Color;  2_matrix=Standard matrix
## 3_type=dim;   3_attr=c;  3_dim=Size;   3_matrix=Standard matrix
## 2_split=,;    3_split=,
## 4_type=stock; 4_attr=u;  4_field=Price
## 5_type=stock; 5_attr=u;  5_field=SKU
hohum	r,g,b	s,m,l	12.00	4208
hohum2	c,m,y,k	s,m,xl	12.00	4208



#
# this will match all stock cells that have a weight of 15, and 
# replace it with 5.
#
# TD.12
#
## 1_type=stock; 1_attr=m; 1_field=weight
## 2_type=stock; 2_attr=u; 2_field=weight
15.00	5.00


#
# this will match all stock cells that have a weight of 15, and 
# replace it with 5.
#
# TD.13
#
## 1_type=item;  1_attr=mc; 1_field=Name
## 2_type=stock; 2_attr=m;  2_field=weight
## 3_type=stock; 3_attr=u;  3_field=weight
hohum	15.00	5.00


#
# -----------------------------------------------------------------------------
#
#  here are a few examples of what can go wrong if you get those little
#  attr fields mixed up
#
#  TD.14
#

#
#  this selects all items from the 'Cars Page.'  Since there is an item
#  in the object set, the 'Hohum car' is _not_ created.  All of the items
#  on the 'Cars Page' have their 'Transmission' snippet updated (but not
#  created if it doesn't exist) to 'standard.'
#
#  This probably isn't what you want.  See the next example.
#
## 1_type=page; 1_field=Name;         1_attr=s
## 2_type=item; 2_field=Name;         2_attr=c
## 3_type=item; 3_field=Transmission; 3_attr=u;

Cars Page	Hohum car	standard

#
#  This creates an item called 'Hohum car' and puts it on the 'Cars Page.'
#  The 'Transmission' snippet is created.
#
## 1_type=page; 1_field=Name;         1_attr=mc
## 2_type=item; 2_field=Name;         2_attr=c
## 3_type=item; 3_field=Transmission; 3_attr=c

Cars Page	Hohum car	standard

#
#  this selects all items on the 'Cars Page,' and updates the 'Name' to 
#  'Hohum car', and then creates a Transmission snippet.  Probably not what
#  you want, either.
#
## 1_type=page; 1_field=Name;         1_attr=s
## 2_type=item; 2_field=Name;         2_attr=u
## 3_type=item; 3_field=Transmission; 3_attr=c

Cars Page	Hohum car	standard

#
#  this selects all items on the 'Cars Page.'  It does not create a 'Hohum
#  car' item, since there are already items in the object set.  It then creates
#  a 'Transmission' snippet for all of those cars.  Hmmmmmm.
#
## 1_type=page; 1_field=Name;         1_attr=s
## 2_type=item; 2_field=Name;         2_attr=c
## 3_type=item; 3_field=Transmission; 3_attr=c

Cars Page	Hohum car	standard

#
# -----------------------------------------------------------------------------
#
# these should all fail.
#
# TD.15

#
# can't have ranges and dimensions.  It doesn't make any logical sense.
#
## 1_type=range; 1_attr=mc; 1_dim=Color; 1_matrix=Standard matrix
## 2_type=dim;   2_attr=cu; 2_matrix=Standard matrix



#
# -----------------------------------------------------------------------------
#

#
#  demonstrates the use of row-level matrix specifications.
#
#  TD.16
#
## 1_type=item;    1_field=Name;        1_attr=mcu;
## 2_type=stock;   2_field=Price;       2_attr=c;
## 3_type=item;    3_field=thingtype;
## 4_type=matrix
## 5_type=dim;     5_dim=Hohum dimension; 5_split=, ;

Car 1	10.00	Car type	Car matrix	red, blue, green
Car 2	20.00	Car type	Car matrix	red, blue, green, black
Club 1	5.00	Club type	Club matrix	firm, stiff, medium
Club 2	7.00	Club type	Club matrix	firm, stiff

#
# -----------------------------------------------------------------------------
#

#
#  demonstrates how to specify multiple items and multiple pages per
#  row.  This isn't really recommended, since it violates the 'one record
#  per row' philosophy of the system, but it works.  One of the problems with
#  this sort of thing is that the prices are going to be all screwed up. 
#  Logically, you associate the first price with the first item, and the
#  second price with the second item, etc.  The system isn't that smart;
#  it creates two items, then sets the price of both to the first price,
#  and then sets the price of both to the second price.  Same thing would
#  go for snippets.
#
#  TD.17
#
## 1_type=item;  1_field=Name;  1_attr=mc;
## 2_type=stock; 2_field=Price; 2_attr=c;
## 3_type=item;  3_field=Name;  3_attr=mc;
## 4_type=stock; 4_field=Price; 4_attr=c;
## 5_type=page;  5_field=Name;  5_attr=mc;
## 6_type=page;  6_field=Name;  6_attr=mc;

Item 1	1.00	Item 2	2.00	Page 1	Page 2
Item 3	3.00	Item 4	4.00	Page 3	Page 4
Item 5	5.00	Item 6	6.00	Page 5	Page 6
