@@ -1148,6 +1148,28 @@ def test_cli(node_factory):
1148
1148
assert [l for l in lines if not re .search (r'^help\[[0-9]*\].' , l )] == ['format-hint=simple' ]
1149
1149
1150
1150
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
+
1151
1173
def test_cli_commando (node_factory ):
1152
1174
l1 , l2 = node_factory .line_graph (2 , fundchannel = False ,
1153
1175
opts = {'log-level' : 'io' })
0 commit comments