# -*- coding:utf-8 -*-

from nose.tools import *
from ex48 import lexicon

def text_directions():
    assert_equal(lexicon.scan("north"),[('direction','north')])
    result = lexicon.scan("north South EAST west donN up Left right back")
    assert_equal(result,[('direction','north'),
                         ('direction','South'),
                         ('direction','EAST'),
                         ('direction','west'),
                         ('direction','donN'),
                         ('direction','Left'),
                         ('direction','right'),
                         ('direction','back'),
                        ])

def test_verbs():
    assert_equal(lexicon.scan("go"),[('verb','go')])
    result = lexicon.scan("go KILL eat stop")
    assert_equal(result,[('verb','go'),
                        ('verb','KILL'),
                        ('verb','eat'),
                        ('verb','stop'),
                   ])

 
