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):
def check_code_short_endtags(self):
self._run_check("""<html><img/></html>""", [
('rawtext', '<html><img/></html>'),
('rawtext', '<html><img /></html>'),
])
......@@ -137,8 +137,8 @@ class METALGeneratorTestCases(TestCaseBase):
self._run_check("", [])
def check_define_macro(self):
macro = [('startTag', 'p',
[('metal:define-macro', 'M', 'metal')]),
macro = self.initial_program + [
('startTag', 'p', [('metal:define-macro', 'M', 'metal')]),
('rawtext', 'booh</p>')]
program = [
('setPosition', (1, 0)),
......@@ -157,7 +157,7 @@ class METALGeneratorTestCases(TestCaseBase):
])
def check_define_slot(self):
macro = [
macro = self.initial_program + [
('startTag', 'p', [('metal:define-macro', 'M', 'metal')]),
('rawtext', 'foo'),
('setPosition', (1, 29)),
......
......@@ -127,7 +127,7 @@ class HTMLTALParserTestCases(TestCaseBase):
def check_code_short_endtags(self):
self._run_check("""<html><img/></html>""", [
('rawtext', '<html><img/></html>'),
('rawtext', '<html><img /></html>'),
])
......@@ -137,8 +137,8 @@ class METALGeneratorTestCases(TestCaseBase):
self._run_check("", [])
def check_define_macro(self):
macro = [('startTag', 'p',
[('metal:define-macro', 'M', 'metal')]),
macro = self.initial_program + [
('startTag', 'p', [('metal:define-macro', 'M', 'metal')]),
('rawtext', 'booh</p>')]
program = [
('setPosition', (1, 0)),
......@@ -157,7 +157,7 @@ class METALGeneratorTestCases(TestCaseBase):
])
def check_define_slot(self):
macro = [
macro = self.initial_program + [
('startTag', 'p', [('metal:define-macro', 'M', 'metal')]),
('rawtext', 'foo'),
('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