Project

Profile

Help

Revision 457ab841

Added by Vincent Le Goff over 4 years ago

Now handle semi-colons in SharpScript

View differences:

src/tests/sharp/test_syntax.py
101 101
        self.assertEqual(statements, [
102 102
            "compile('print 1\nprint 3', 'SharpScript', 'exec')",
103 103
        ])
104

  
105
    def test_semicolons(self):
106
        """Test the semi-colons."""
107
        # A test with simple text
108
        statements = self.engine.feed("#macro F1 north;south;;east")
109
        self.assertEqual(statements, ["macro('F1', 'north\nsouth;east')"])
110

  
111
        # A test with SharpScript
112
        statements = self.engine.feed("#trigger ok {#play new.wav;#stop}")
113
        self.assertEqual(statements, [
114
                "trigger('ok', '#play new.wav\n#stop')",
115
        ])

Also available in: Unified diff