···10651065 match inner_acc with
10661066 | Some _ as v -> v
10671067 | None ->
10681068- let pattern = word_cst_to_string pattern in
10681068+ let _, pattern =
10691069+ word_expansion
10701070+ {
10711071+ ctx with
10721072+ options =
10731073+ Built_ins.Options.with_options
10741074+ ~no_path_expansion:true ctx.options;
10751075+ }
10761076+ pattern
10771077+ in
10781078+ let pattern =
10791079+ Ast.Fragment.join_list ~sep:""
10801080+ (List.concat pattern)
10811081+ in
10691082 if Glob.test ~pattern scrutinee then begin
10701083 match sub with
10711084 | Some sub -> Some (exec_subshell ctx sub)
+24
test/cases.t
···3737 All good...
3838 Stopping service
3939 Unknown command: foo
4040+4141+4242+ $ cat > test.sh << EOF
4343+ > contains () {
4444+ > case \$1 in
4545+ > *\$2*)
4646+ > echo "Yep, \$2 is in \$1"
4747+ > ;;
4848+ > *)
4949+ > echo "\$1 does not contain \$2"
5050+ > ;;
5151+ > esac
5252+ > }
5353+ >
5454+ > contains "radar" "ada"
5555+ > contains "hello" "ee"
5656+ > EOF
5757+5858+ $ sh test.sh
5959+ Yep, ada is in radar
6060+ hello does not contain ee
6161+ $ msh test.sh
6262+ Yep, ada is in radar
6363+ hello does not contain ee