@@ -1148,6 +1148,28 @@ def test_cli(node_factory):
11481148 assert [l for l in lines if not re .search (r'^help\[[0-9]*\].' , l )] == ['format-hint=simple' ]
11491149
11501150
1151+ def test_cli_multiline_help (node_factory ):
1152+ l1 = node_factory .get_node (options = {'plugin' : os .path .join (os .getcwd (), 'tests/plugins/multiline-help.py' )})
1153+
1154+ out = subprocess .check_output (['cli/lightning-cli' ,
1155+ '--network={}' .format (TEST_NETWORK ),
1156+ '--lightning-dir={}'
1157+ .format (l1 .daemon .lightning_dir ),
1158+ 'help' ]).decode ('utf-8' )
1159+ assert ("helpme msat \n "
1160+ " This is a message which consumes multiple lines and thus should\n "
1161+ " be well-formatted by lightning-cli help\n " in out )
1162+
1163+ out = subprocess .check_output (['cli/lightning-cli' ,
1164+ '--network={}' .format (TEST_NETWORK ),
1165+ '--lightning-dir={}'
1166+ .format (l1 .daemon .lightning_dir ),
1167+ 'help' , 'helpme' ]).decode ('utf-8' )
1168+ assert out == ("helpme msat \n "
1169+ " This is a message which consumes multiple lines and thus should\n "
1170+ " be well-formatted by lightning-cli help\n " )
1171+
1172+
11511173def test_cli_commando (node_factory ):
11521174 l1 , l2 = node_factory .line_graph (2 , fundchannel = False ,
11531175 opts = {'log-level' : 'io' })
0 commit comments