This repository has been archived by the owner on Jan 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
/
table_plugin_test.py
649 lines (560 loc) · 24.7 KB
/
table_plugin_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
# table_plugin_test.py - sublime plugin with integration tests
# Copyright (C) 2012 Free Software Foundation, Inc.
# Author: Valery Kocubinsky
# Package: SublimeTableEditor
# Homepage: https://github.com/vkocubinsky/SublimeTableEditor
# This file is part of SublimeTableEditor.
# SublimeTableEditor is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# SublimeTableEditor is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with SublimeTableEditor. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function
import sublime
import sublime_plugin
class CommandDef:
def __init__(self, name, args=None):
self.name = name
self.args = args
class CallbackTest:
def __init__(self, name, syntax):
self.name = name
self.commands = []
self.commands.append(CommandDef("table_editor_set_syntax",
{"syntax": syntax}))
self.commands.append(CommandDef("table_editor_disable_for_current_view",
{"prop": "table_editor_keep_space_left"}))
self.commands.append(CommandDef("table_editor_enable_for_current_view",
{"prop": "table_editor_detect_header"}))
self.commands.append(CommandDef("table_editor_enable_for_current_view",
{"prop": "table_editor_align_number_right"}))
self.commands.append(CommandDef("table_editor_enable_for_current_view",
{"prop": "table_editor_intelligent_formatting"}))
self.commands.append(CommandDef("select_all"))
self.commands.append(CommandDef("cut"))
def expected_value(self):
pass
def test(actual_value):
pass
class SimpleBasicEditingTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Basic Editing", "Simple")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
| Name | Phone |
|-"""}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "Anna"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "123456789"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "Alexander"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "987654321"}))
self.commands.append(CommandDef("table_editor_next_field"))
@property
def description(self):
return """Test: {0}
- Simple Table Syntax
- Create simple table
- Navigate with tab key
- Automatic row creation
- Fill the table
""".format(self.name)
def expected_value(self):
return """{0}
| Name | Phone |
|-----------|-----------|
| Anna | 123456789 |
| Alexander | 987654321 |
| | |""".format(self.description)
class SimpleQuickTableCreateTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Quick Table Creation", "Simple")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
| Name | Phone"""}))
self.commands.append(CommandDef("table_editor_hline_and_move"))
@property
def description(self):
return """Test: {0}
- Simple Table Syntax
- Quick table creation with key ctrl+k,enter
""".format(self.name)
def expected_value(self):
return """{0}
| Name | Phone |
|------|-------|
| | |""".format(self.description)
class SimpleGridTableTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Grid Table Creation", "Simple")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
| Name | Phone |
|="""}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "Anna"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "123456789"}))
self.commands.append(CommandDef("table_editor_hline_and_move"))
self.commands.append(CommandDef("insert", {"characters": "Alexander"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "987654321"}))
self.commands.append(CommandDef("table_editor_hline_and_move"))
@property
def description(self):
return """Test: {0}
- Simple Table Syntax
- Create simple table
- Use double hline
- Add lines separated by single hline
""".format(self.name)
def expected_value(self):
return """{0}
| Name | Phone |
|===========|===========|
| Anna | 123456789 |
|-----------|-----------|
| Alexander | 987654321 |
|-----------|-----------|
| | |""".format(self.description)
class SimpleColumnsTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Work with columns", "Simple")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
| Name | Phone |
|-"""}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "Anna"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "123456789"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "Alexander"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "987654321"}))
self.commands.append(CommandDef("table_editor_next_row"))
self.commands.append(CommandDef("table_editor_insert_column"))
for i in range(0, 3):
self.commands.append(CommandDef("table_editor_previous_field"))
self.commands.append(CommandDef("insert", {"characters": "28"}))
for i in range(0, 3):
self.commands.append(CommandDef("table_editor_previous_field"))
self.commands.append(CommandDef("insert", {"characters": "32"}))
for i in range(0, 3):
self.commands.append(CommandDef("table_editor_previous_field"))
self.commands.append(CommandDef("insert", {"characters": "Age"}))
self.commands.append(CommandDef("table_editor_move_column_right"))
self.commands.append(CommandDef("table_editor_delete_column"))
@property
def description(self):
return """Test: {0}
- Simple Table Syntax
- Create simple table
- Insert And Fill Column
- Move Column Right
- Delete Column
""".format(self.name)
def expected_value(self):
return """{0}
| Name | Phone |
|-----------|-----------|
| Anna | 123456789 |
| Alexander | 987654321 |
| | |""".format(self.description)
class SimpleRowsTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Work with rows", "Simple")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
| Name | Phone | Age |
|-----------|-----------|-----|
| Anna | 123456789 | 32 |
| Alexander | 987654321 | 28 |"""}))
self.commands.append(CommandDef("table_editor_next_field"))
for i in range(4):
self.commands.append(CommandDef("table_editor_previous_field"))
self.commands.append(CommandDef("table_editor_insert_row"))
self.commands.append(CommandDef("table_editor_kill_row"))
@property
def description(self):
return """Test: {0}
- Simple Table Syntax
- Insert Row
- Delete Row
""".format(self.name)
def expected_value(self):
return """{0}
| Name | Phone | Age |
|-----------|-----------|-----|
| Anna | 123456789 | 32 |
| Alexander | 987654321 | 28 |
| | | |""".format(self.description)
class SimpleLongRowsTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Work with long rows", "Simple")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
| Name | Phone | Age | Position |
|-----------|-----------|-----|----------------------------------|
| Anna | 123456789 | 32 | Senior Software Engineer |
| Alexander | 987654321 | 28 | Senior Software Testing Engineer |"""}))
self.commands.append(CommandDef("table_editor_next_field"))
for i in range(5):
self.commands.append(CommandDef("table_editor_previous_field"))
self.commands.append(CommandDef("table_editor_insert_single_hline"))
self.commands.append(CommandDef("move", {"by": "words", "forward": False}))
self.commands.append(CommandDef("table_editor_split_column_down"))
for i in range(4):
self.commands.append(CommandDef("table_editor_previous_field"))
self.commands.append(CommandDef("move", {"by": "words", "forward": False}))
self.commands.append(CommandDef("table_editor_split_column_down"))
for i in range(4):
self.commands.append(CommandDef("table_editor_previous_field"))
self.commands.append(CommandDef("table_editor_join_lines"))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("table_editor_hline_and_move"))
@property
def description(self):
return """Test: {0}
- Simple Table Syntax
- Split Row
- Join Rows
- Insert hlines
""".format(self.name)
def expected_value(self):
return """{0}
| Name | Phone | Age | Position |
|-----------|-----------|-----|----------------------------------|
| Anna | 123456789 | 32 | Senior Software Engineer |
|-----------|-----------|-----|----------------------------------|
| Alexander | 987654321 | 28 | Senior Software Testing Engineer |
|-----------|-----------|-----|----------------------------------|
| | | | |""".format(self.description)
class SimpleCustomAlignTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Custom align test", "Simple")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
| column A | column B | column C |
| < | > | # |
|-"""}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "1"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "one"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "'1'"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "2"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "two"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "'2'"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": ">"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "<"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "#"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "1"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "one"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "'1'"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "2"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "two"}))
self.commands.append(CommandDef("table_editor_next_field"))
self.commands.append(CommandDef("insert", {"characters": "'2'"}))
self.commands.append(CommandDef("table_editor_next_field"))
@property
def description(self):
return """Test: {0}
- Simple Table Syntax
- Create table with separator
- Navigate with tab key
- Custom align
""".format(self.name)
def expected_value(self):
return """{0}
| column A | column B | column C |
| <<<<<<<< | >>>>>>>> | ######## |
|----------|----------|----------|
| 1 | one | '1' |
| 2 | two | '2' |
| >>>>>>>> | <<<<<<<< | ######## |
| 1 | one | '1' |
| 2 | two | '2' |
| | | |""".format(self.description)
class reStructuredTextKeepSpaceLeftTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Keep Spece left", "reStructuredText")
self.commands.append(CommandDef("table_editor_enable_for_current_view", {"prop": "table_editor_keep_space_left"}))
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
+-------------+
| widget code |
+===============================================+
| code-block::javascript |
| |
| widget.dispatchEvent('onSetTags', object); |
+-----------------------------------------------+"""}))
self.commands.append(CommandDef("table_editor_align"))
@property
def description(self):
return """Test: {0}
- reStructuredText Syntax
""".format(self.name)
def expected_value(self):
return """{0}
+-----------------------------------------------+
| widget code |
+===============================================+
| code-block::javascript |
| |
| widget.dispatchEvent('onSetTags', object); |
+-----------------------------------------------+""".format(self.description)
class reStructuredTextDisableDetectHeaderTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Disable Detect Header Test", "reStructuredText")
self.commands.append(CommandDef("table_editor_disable_for_current_view", {"prop": "table_editor_detect_header"}))
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
+--------+
| header |
+--------+
| long and shifted data row |
+---------------------------+"""}))
self.commands.append(CommandDef("table_editor_align"))
@property
def description(self):
return """Test: {0}
- reStructuredText Syntax
- Disable detect header
""".format(self.name)
def expected_value(self):
return """{0}
+---------------------------+
| header |
+---------------------------+
| long and shifted data row |
+---------------------------+""".format(self.description)
class PandocAlignTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Pandoc Align Test", "Pandoc")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
+-----------+-----------+-----+
| Name | Phone | Age |
+===========+===========+=====+
| Anna | 123456789 | 32 |
+-----------+-----------+-----+
| Alexander | 987654321 | 28 |
+-----------+-----------+-----+"""}))
self.commands.append(CommandDef("table_editor_align"))
@property
def description(self):
return """Test: {0}
- Pandoc Syntax
""".format(self.name)
def expected_value(self):
return """{0}
+-----------+-----------+-----+
| Name | Phone | Age |
+===========+===========+=====+
| Anna | 123456789 | 32 |
+-----------+-----------+-----+
| Alexander | 987654321 | 28 |
+-----------+-----------+-----+""".format(self.description)
class EmacsOrgModeAlignTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "EmacsOrgMode Align Test", "EmacsOrgMode")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
|-----------+-----------+-----|
| Name | Phone | Age |
|===========+===========+=====|
| Anna | 123456789 | 32 |
|-----------+-----------+-----|
| Alexander | 987654321 | 28 |
|-----------+-----------+-----|"""}))
self.commands.append(CommandDef("table_editor_align"))
@property
def description(self):
return """Test: {0}
- EmacsOrgMode Syntax
""".format(self.name)
def expected_value(self):
return """{0}
|-----------+-----------+-----|
| Name | Phone | Age |
|===========+===========+=====|
| Anna | 123456789 | 32 |
|-----------+-----------+-----|
| Alexander | 987654321 | 28 |
|-----------+-----------+-----|""".format(self.description)
class MarkdownColspanTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "MultiMarkdown Colspan Test", "MultiMarkdown")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
| | Grouping ||
| First Header | Second Header | Third Header |
| ------------ | :-----------: | -----------: |
| Content | *Long Cell* ||
| Content | **Cell** | Cell |
| New section | More | Data |
| And more | And more | |
| :---------------------------------------: |||"""}))
self.commands.append(CommandDef("table_editor_align"))
@property
def description(self):
return """Test: {0}
- MultiMarkdown Syntax
""".format(self.name)
def expected_value(self):
return """{0}
| | Grouping ||
| First Header | Second Header | Third Header |
| ------------ | :-----------: | -----------: |
| Content | *Long Cell* ||
| Content | **Cell** | Cell |
| New section | More | Data |
| And more | And more | |
| :---------------------------------------: |||""".format(self.description)
class TextileAlignTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Textile Align Test", "Textile")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": """
|_. Name |_. Age |_. Custom Alignment Demo |
| Anna | 20 |<. left |
| Alexander | 27 |>. right |
| Misha | 42 |=. center |
| | | |"""}))
self.commands.append(CommandDef("table_editor_align"))
@property
def description(self):
return """Test: {0}
- Textile Syntax
""".format(self.name)
def expected_value(self):
return """{0}
|_. Name |_. Age |_. Custom Alignment Demo |
| Anna | 20 |<. left |
| Alexander | 27 |>. right |
| Misha | 42 |=. center |
| | | |""".format(self.description)
class TextileColspanTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Textile Colspan Test", "Textile")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": r"""
|\2. spans two cols |
| col 1 | col 2 |"""}))
self.commands.append(CommandDef("table_editor_align"))
@property
def description(self):
return """Test: {0}
- Textile Syntax
""".format(self.name)
def expected_value(self):
return r"""{0}
|\2. spans two cols |
| col 1 | col 2 |""".format(self.description)
class TextileRowspanTest(CallbackTest):
def __init__(self):
CallbackTest.__init__(self, "Textile Rowspan Test", "Textile")
self.commands.append(CommandDef("insert", {"characters": self.description}))
self.commands.append(CommandDef("insert", {"characters": r"""
|/3. spans 3 rows | a |
| b |
| c |"""}))
self.commands.append(CommandDef("table_editor_align"))
@property
def description(self):
return """Test: {0}
- Textile Syntax
""".format(self.name)
def expected_value(self):
return r"""{0}
|/3. spans 3 rows | a |
| b |
| c |""".format(self.description)
class TableEditorTestSuite(sublime_plugin.TextCommand):
COMMAND_TIMEOUT = 25
TEST_TIMEOUT = 50
def __init__(self, view):
sublime_plugin.TextCommand.__init__(self, view)
def run(self):
tests = []
tests.append(SimpleBasicEditingTest())
tests.append(SimpleQuickTableCreateTest())
tests.append(SimpleGridTableTest())
tests.append(SimpleColumnsTest())
tests.append(SimpleRowsTest())
tests.append(SimpleLongRowsTest())
tests.append(SimpleCustomAlignTest())
tests.append(reStructuredTextKeepSpaceLeftTest())
tests.append(reStructuredTextDisableDetectHeaderTest())
tests.append(PandocAlignTest())
tests.append(EmacsOrgModeAlignTest())
tests.append(MarkdownColspanTest())
tests.append(TextileAlignTest())
tests.append(TextileColspanTest())
tests.append(TextileRowspanTest())
self.run_tests(tests, 0, 0)
def run_tests(self, tests, test_ind, command_ind):
if test_ind >= len(tests):
self.view.run_command("select_all")
self.view.run_command("cut")
self.view.run_command("insert", {"characters": """
{0} tests ran sucessfully
Click ctrl+w to close this window""".format(len(tests))})
return
test = tests[test_ind]
if command_ind == 0:
print("run test", test.name)
command = test.commands[command_ind]
self.view.run_command(command.name, command.args)
if command_ind + 1 < len(test.commands):
sublime.set_timeout(lambda: self.run_tests(tests, test_ind, command_ind + 1),
TableEditorTestSuite.COMMAND_TIMEOUT)
else:
text = self.get_buffer_text()
if text.strip() != tests[test_ind].expected_value().strip():
self.view.run_command("move_to", {"extend": False, "to": "eof"})
self.view.run_command("insert", {"characters": """
Test {0} failed:
Expected:
{1}<<<
Actual:
{2}<<<
""".format(tests[test_ind].name, tests[test_ind].expected_value(), text)})
else:
self.view.run_command("move_to", {"extend": False, "to": "eof"})
self.view.run_command("insert", {"characters": """
Test {0} executed sucessfully
""".format(tests[test_ind].name)})
sublime.set_timeout(lambda: self.run_tests(tests, test_ind + 1, 0),
TableEditorTestSuite.TEST_TIMEOUT)
def get_buffer_text(self):
return self.view.substr(sublime.Region(0, self.view.size()))
class TableEditorFilmCommand(sublime_plugin.WindowCommand):
def run(self):
view = self.window.new_file()
view.set_scratch(True)
view.set_name("Sublime Table Editor Film")
view.settings().set("table_editor_border_style", "simple")
view.run_command("table_editor_enable_for_current_view", {"prop": "enable_table_editor"})
suite = TableEditorTestSuite(view)
suite.run()