mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
cli: restore 0.7.0-style whitespace printing.
@renepickhardt has a shell script we broke. While we still produce perfectly valid JSON, we should not gratuitously change tool output. Plus, I prefer the missing space before the ':'. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
ZmnSCPxj, ZmnSCPxj jxPCSmnZ
parent
2f30cdc731
commit
118150227e
@@ -658,6 +658,20 @@ def test_cli(node_factory):
|
|||||||
j = json.loads(out)
|
j = json.loads(out)
|
||||||
assert only_one(j['invoices'])['label'] == 'l"[]{}'
|
assert only_one(j['invoices'])['label'] == 'l"[]{}'
|
||||||
|
|
||||||
|
# For those using shell scripts (you know who you are Rene), make sure we're maintaining whitespace
|
||||||
|
lines = [l for l in out.splitlines() if '"bolt11"' not in l and '"payment_hash"' not in l and '"expires_at"' not in l]
|
||||||
|
assert lines == ['{',
|
||||||
|
' "invoices": [',
|
||||||
|
' {',
|
||||||
|
r' "label": "l\"[]{}",',
|
||||||
|
' "msatoshi": 123000,',
|
||||||
|
' "amount_msat": "123000msat",',
|
||||||
|
' "status": "unpaid",',
|
||||||
|
r' "description": "d\"[]{}",',
|
||||||
|
' }',
|
||||||
|
' ]',
|
||||||
|
'}']
|
||||||
|
|
||||||
|
|
||||||
def test_daemon_option(node_factory):
|
def test_daemon_option(node_factory):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user