~fmos/zim/features

« back to all changes in this revision

Viewing changes to tests/applications.py

  • Committer: Fabian Moser
  • Date: 2011-01-26 20:33:29 UTC
  • mfrom: (297.1.43 pyzim-trunk)
  • Revision ID: e-mail+launchpad@fabianmoser.at-20110126203329-9qhtvpsf169hb18y
Merged main branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
                # %n for notebook location (file or directory)
165
165
                # %D for document root
166
166
                # %t for selected text or word under cursor
 
167
                # %T for selected text or word under cursor with wiki format
167
168
 
168
169
                notebook = tests.get_test_notebook()
169
170
                page = notebook.get_page(Path('Test:Foo'))
188
189
                        ('foo %n', ('foo', dir.path)),
189
190
                        ('foo %D', ('foo', '')), # no document root
190
191
                        ('foo %t', ('foo', 'FooBar')),
 
192
                        ('foo %T', ('foo', '**FooBar**')),
191
193
                ):
192
194
                        #~ print '>>>', cmd
193
195
                        tool['Desktop Entry']['X-Zim-ExecTool'] = cmd
196
198
 
197
199
class StubPageView(object):
198
200
 
199
 
        def get_selection(self):
 
201
        def get_selection(self, format=None):
200
202
                return None
201
203
 
202
 
        def get_word(self):
203
 
                return 'FooBar'
 
204
        def get_word(self, format=None):
 
205
                if format:
 
206
                        return '**FooBar**'
 
207
                else:
 
208
                        return 'FooBar'