#!/usr/bin/python

import unittest

from parse import parse

class TestCases(unittest.TestCase):
    
    def test_one(self):
        self.assertEquals(
            ['ARM:primary:1',
             'ARM:primary:argent',
             'ARM:primary:embowed',
             'HORN AND ATTIRES:1:or'], 
            list(parse(u"(Fieldless) An arm embowed argent sustaining a stag's attire Or.").describe()))
        self.assertEquals(
            ['CRAC:primary:1',
             'CRAC:primary:or',
             'CRAC:primary:plain cross',
             'FDL:1:sable'], 
            list(parse(u'(Fieldless) On a cross couped Or, a fleur-de-lys sable').describe()))
        self.assertEquals(
            ['AR', 
             'DOG:primary:1', 
             'DOG:primary:sable', 
             'DOG:primary:courant', 
             'ESCALLOP:3:gules'], 
            list(parse(u'Argent, a greyhound courant sable between three escallops gules.').describe()))
        self.assertEquals(
            ['AR',
             'SPINDLE:primary:1',
             'SPINDLE:primary:purpure',
             '?TOOL-SEWING AND WEAVING:1:purpure:primary',
             'CHIEF:1:purpure',
             'POLE-AXE:1:argent'], 
            list(parse(u'Argent, an empty bottom-whorl drop spindle and on a chief purpure a glaive argent.').describe()))
        self.assertEquals(
            ['AZ',
             'CRAC:primary:1',
             'CRAC:primary:or',
             'CRAC:primary:moline',
             'CHIEF:1:or',
             'BIRD:3:azure:volant to dexter',
             '?BIRD9DEMI:3:azure:volant to dexter'], 
            list(parse(u'Azure, a cross moline and on a chief Or three martlets volant azure').describe()))
        self.assertEquals(
            ['OR',
             'FIELD TREATMENT-SEME (CRUSILLY):sable',
             '?CRAC:sable',
             'CROSS:primary:1',
             'CROSS:primary:gules',
             'BIRD:1:or:eagle:displayed',
             '?BIRD9DEMI:1:or:eagle:displayed'], 
            list(parse(u'Or, crusilly sable, on a cross throughout gules, an eagle displayed Or.\n\n').describe()))
        self.assertEquals(
            ['OR',
             'ARROW:primary:2',
             'ARROW:primary:vert',
             'INSA:2:vert:primary',
             'JEWELS AND JEWELRY:1:gules',
             '?CROWN:1:gules'], 
            list(parse(u'Or, two arrows in saltire vert within a rosary gules.\n').describe()))
        self.assertEquals(
            ['PB:purpure:~and sable',
             'HEADDOG:primary:1',
             'HEADDOG:primary:argent',
             'FLOWER-IRIS AND ORCHID:primary:1',
             'FLOWER-IRIS AND ORCHID:primary:argent',
             'FLOWER-IRIS AND ORCHID:primary:bendwise'], 
            list(parse(u"Per bend purpure and sable, a wolf's head erased and an iris bendwise slipped and leaved argent").describe()))
        self.assertEquals(
            ['PCI:sable:~and purpure',
             'CASTLE:primary:1',