def test018(self):
     from zope.index.text.parsetree import AndNode
     from zope.index.text.parsetree import AtomNode
     from zope.index.text.parsetree import NotNode
     from zope.index.text.parsetree import PhraseNode
     parser = self._makeOne()
     self._expect(parser, 'booh -"foo bar"',
                  AndNode([AtomNode("booh"),
                          NotNode(PhraseNode(["foo", "bar"]))]))
 def test012(self):
     from zope.index.text.parsetree import PhraseNode
     parser = self._makeOne()
     self._expect(parser, '(("foo bar"))"', PhraseNode(["foo", "bar"]))
 def test014(self):
     from zope.index.text.parsetree import PhraseNode
     parser = self._makeOne()
     self._expect(parser, "foo-bar", PhraseNode(["foo", "bar"]))
Exemple #4
0
 def test_asterisk_in_phrase(self):
     from zope.index.text.parsetree import AndNode
     from zope.index.text.parsetree import PhraseNode
     parser = self._makeOne()
     self._expect(parser, '"foo bar* * baz"',
                  PhraseNode(['foo', 'bar*', 'baz']))