Commit a52a0cab authored by Guido van Rossum's avatar Guido van Rossum

Change the expected code for macro definitions to include version and

mode opcodes.

Fix check_code_short_endtags(), which should have used <img /> since
the previous batch of changes.
parent 990a78a9
...@@ -127,7 +127,7 @@ class HTMLTALParserTestCases(TestCaseBase): ...@@ -127,7 +127,7 @@ class HTMLTALParserTestCases(TestCaseBase):
def check_code_short_endtags(self): def check_code_short_endtags(self):
self._run_check("""<html><img/></html>""", [ self._run_check("""<html><img/></html>""", [
('rawtext', '<html><img/></html>'), ('rawtext', '<html><img /></html>'),
]) ])
...@@ -137,8 +137,8 @@ class METALGeneratorTestCases(TestCaseBase): ...@@ -137,8 +137,8 @@ class METALGeneratorTestCases(TestCaseBase):
self._run_check("", []) self._run_check("", [])
def check_define_macro(self): def check_define_macro(self):
macro = [('startTag', 'p', macro = self.initial_program + [
[('metal:define-macro', 'M', 'metal')]), ('startTag', 'p', [('metal:define-macro', 'M', 'metal')]),
('rawtext', 'booh</p>')] ('rawtext', 'booh</p>')]
program = [ program = [
('setPosition', (1, 0)), ('setPosition', (1, 0)),
...@@ -157,7 +157,7 @@ class METALGeneratorTestCases(TestCaseBase): ...@@ -157,7 +157,7 @@ class METALGeneratorTestCases(TestCaseBase):
]) ])
def check_define_slot(self): def check_define_slot(self):
macro = [ macro = self.initial_program + [
('startTag', 'p', [('metal:define-macro', 'M', 'metal')]), ('startTag', 'p', [('metal:define-macro', 'M', 'metal')]),
('rawtext', 'foo'), ('rawtext', 'foo'),
('setPosition', (1, 29)), ('setPosition', (1, 29)),
......
...@@ -127,7 +127,7 @@ class HTMLTALParserTestCases(TestCaseBase): ...@@ -127,7 +127,7 @@ class HTMLTALParserTestCases(TestCaseBase):
def check_code_short_endtags(self): def check_code_short_endtags(self):
self._run_check("""<html><img/></html>""", [ self._run_check("""<html><img/></html>""", [
('rawtext', '<html><img/></html>'), ('rawtext', '<html><img /></html>'),
]) ])
...@@ -137,8 +137,8 @@ class METALGeneratorTestCases(TestCaseBase): ...@@ -137,8 +137,8 @@ class METALGeneratorTestCases(TestCaseBase):
self._run_check("", []) self._run_check("", [])
def check_define_macro(self): def check_define_macro(self):
macro = [('startTag', 'p', macro = self.initial_program + [
[('metal:define-macro', 'M', 'metal')]), ('startTag', 'p', [('metal:define-macro', 'M', 'metal')]),
('rawtext', 'booh</p>')] ('rawtext', 'booh</p>')]
program = [ program = [
('setPosition', (1, 0)), ('setPosition', (1, 0)),
...@@ -157,7 +157,7 @@ class METALGeneratorTestCases(TestCaseBase): ...@@ -157,7 +157,7 @@ class METALGeneratorTestCases(TestCaseBase):
]) ])
def check_define_slot(self): def check_define_slot(self):
macro = [ macro = self.initial_program + [
('startTag', 'p', [('metal:define-macro', 'M', 'metal')]), ('startTag', 'p', [('metal:define-macro', 'M', 'metal')]),
('rawtext', 'foo'), ('rawtext', 'foo'),
('setPosition', (1, 29)), ('setPosition', (1, 29)),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment