mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
generator: Passing "" to StringList tests should turn into empty list.
This is a bug in the generator which wasn't being tickled. If you had a test which expected a StringList or DeviceList parameter, and you passed "" to that test, then you'd (probably) expect to be testing an empty list, but in fact you got a single element list containing an empty string. This fixes it so you get an empty list.
This commit is contained in:
@@ -6644,6 +6644,8 @@ and generate_test_command_call ?(expect_error = false) ?test test_name cmd =
|
||||
| Int64 _, _
|
||||
| Bool _, _
|
||||
| FileIn _, _ | FileOut _, _ -> ()
|
||||
| StringList n, "" | DeviceList n, "" ->
|
||||
pr " const char *const %s[1] = { NULL };\n" n
|
||||
| StringList n, arg | DeviceList n, arg ->
|
||||
let strs = string_split " " arg in
|
||||
iteri (
|
||||
|
||||
Reference in New Issue
Block a user