github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/core/autocomplete/mxjson_bug_test.go (about) 1 package cmdautocomplete 2 3 import ( 4 "testing" 5 6 "github.com/lmorg/murex/lang/types" 7 "github.com/lmorg/murex/test" 8 ) 9 10 func TestMxJsonBug(t *testing.T) { 11 block := `[ 12 { 13 "DynamicDesc": ({ 14 systemctl: --help -> @[..Unit Commands:]s -> tabulate: --column-wraps --map --key-inc-hint --split-space 15 }), 16 "Optional": true, 17 "AllowMultiple": false 18 }, 19 { 20 "DynamicDesc": ({ 21 systemctl: --help -> @[Unit Commands:..]s -> tabulate: --column-wraps --map --key-inc-hint 22 }), 23 "Optional": false, 24 "AllowMultiple": false, 25 "FlagValues": { 26 } 27 } 28 ]` 29 30 test.RunMethodTest( 31 t, cmdAutocomplete, "autocomplete", 32 block, types.Null, 33 []string{"set", "systemctl"}, 34 "", nil, 35 ) 36 }