File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 102102 expect { subject . execute %w[ generate --wrap function ] } . to output_approval ( 'cli/generate/wrap-function' )
103103 expect ( File ) . to exist ( cli_script )
104104 lines = File . readlines cli_script
105- expect ( lines [ 0 ..10 ] . join ) . to match_approval ( 'cli/generate/wrap-script' ) . except ( /\d +\. \d +\. \d +/ )
105+ expect ( lines [ 0 ..10 ] . join ) . to match_approval ( 'cli/generate/wrap-script' )
106+ . except ( /\d +\. \d +\. \d +(\. rc\d )?/ )
106107 end
107108 end
108109
Original file line number Diff line number Diff line change 1111 context 'without function name' do
1212 it 'returns the complete script' do
1313 lines = subject . code . split "\n "
14- expect ( lines [ 0 ..13 ] . join ( "\n " ) ) . to match_approval ( 'script/wrapper/code' ) . except ( /\d +\. \d +\. \d +/ )
14+ expect ( lines [ 0 ..13 ] . join ( "\n " ) ) . to match_approval ( 'script/wrapper/code' )
15+ . except ( /\d +\. \d +\. \d +(\. rc\d )?/ )
1516 expect ( lines [ -1 ] ) . to eq 'run "$@"'
1617 end
1718 end
2122
2223 it 'returns the complete script wrapped in a function without a bash3 bouncer' do
2324 lines = subject . code . split "\n "
24- expect ( lines [ 0 ..13 ] . join ( "\n " ) ) . to match_approval ( 'script/wrapper/code-wrapped' ) . except ( /\d +\. \d +\. \d +/ )
25+ expect ( lines [ 0 ..13 ] . join ( "\n " ) ) . to match_approval ( 'script/wrapper/code-wrapped' )
26+ . except ( /\d +\. \d +\. \d +(\. rc\d )?/ )
2527 expect ( lines [ -1 ] ) . to eq '(return 0 2>/dev/null) || my_super_function "$@"'
2628 end
2729 end
You can’t perform that action at this time.
0 commit comments