4 test_description='git web--browse basic tests
 
   6 This test checks that git web--browse can handle various valid URLs.'
 
  12         git web--browse --browser="$1" "$2" >actual &&
 
  13         tr -d '\015' <actual >text &&
 
  18         'URL with an ampersand in it' '
 
  19         echo http://example.com/foo\&bar >expect &&
 
  20         git config browser.custom.cmd echo &&
 
  21         test_web_browse custom http://example.com/foo\&bar
 
  25         'URL with a semi-colon in it' '
 
  26         echo http://example.com/foo\;bar >expect &&
 
  27         git config browser.custom.cmd echo &&
 
  28         test_web_browse custom http://example.com/foo\;bar
 
  32         'URL with a hash in it' '
 
  33         echo http://example.com/foo#bar >expect &&
 
  34         git config browser.custom.cmd echo &&
 
  35         test_web_browse custom http://example.com/foo#bar
 
  39         'browser paths are properly quoted' '
 
  40         echo fake: http://example.com/foo >expect &&
 
  41         cat >"fake browser" <<-\EOF &&
 
  45         chmod +x "fake browser" &&
 
  46         git config browser.w3m.path "`pwd`/fake browser" &&
 
  47         test_web_browse w3m http://example.com/foo
 
  51         'browser command allows arbitrary shell code' '
 
  52         echo "arg: http://example.com/foo" >expect &&
 
  53         git config browser.custom.cmd "
 
  60         test_web_browse custom http://example.com/foo