mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-19 13:04:37 +01:00
lightningd: use ccan/json_out.
This is now a fairly simple transition, which only effects the internals of json_stream. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -636,13 +636,14 @@ def test_cli(node_factory):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Test it escapes JSON properly in both method and params.
|
||||
# Test it escapes JSON completely in both method and params.
|
||||
# cli turns " into \", reply turns that into \\\".
|
||||
out = subprocess.run(['cli/lightning-cli',
|
||||
'--lightning-dir={}'
|
||||
.format(l1.daemon.lightning_dir),
|
||||
'x"[]{}'],
|
||||
stdout=subprocess.PIPE)
|
||||
assert 'Unknown command \'x\\"[]{}\'' in out.stdout.decode('utf-8')
|
||||
assert 'Unknown command \'x\\\\\\"[]{}\'' in out.stdout.decode('utf-8')
|
||||
|
||||
subprocess.check_output(['cli/lightning-cli',
|
||||
'--lightning-dir={}'
|
||||
|
||||
Reference in New Issue
Block a user