Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtsafe order bug #1265

Merged
merged 6 commits into from
Jun 6, 2019
Merged

Runtsafe order bug #1265

merged 6 commits into from
Jun 6, 2019

Conversation

jnwatson
Copy link
Contributor

@jnwatson jnwatson commented Jun 6, 2019

[test:str=foo :hehe=bar] $tvar=$lib.text('') $tvar.add(1) $tvar.add(:hehe) $lib.print($tvar.str())
would evaluate adding :hehe and 1 in the wrong order.

Also fix a bug in error printing in cmdr on a long line with the syntax error near the beginning of the line.

Happens if len(line) > 60 and error was in the first 30 chars.
@vEpiphyte vEpiphyte added this to the v0.1.11 milestone Jun 6, 2019
@vEpiphyte vEpiphyte added the bug label Jun 6, 2019
synapse/lib/ast.py Outdated Show resolved Hide resolved
synapse/lib/ast.py Outdated Show resolved Hide resolved
@@ -2768,6 +2768,12 @@ class Bawk:
nodes = await core.nodes(q)
self.len(1, nodes)

async def test_storm_order(self):
q = '''[test:str=foo :hehe=bar] $tvar=$lib.text('') $tvar.add(1) $tvar.add(:hehe) $lib.print($tvar.str()) '''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$lib.text() doesn't need the '' arg

@vEpiphyte vEpiphyte merged commit b365d02 into master Jun 6, 2019
@vEpiphyte vEpiphyte deleted the runtsafe-order-bug branch June 19, 2019 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants