=begin

  % ln -s webunit/cgi $DOCUMENT_ROOT/tmp/webunit
  % cp webunit/cgi/auth/.htpasswd /tmp
  % URLBASE=http://localhost/tmp/ runtest.rb test_link.rb


  require 'webunit/webunit'
  
  # get start HTML page
  url = 'test-1.html'
  response = WebUnit::Response::get( url )

  # test HTML page contents
  assert_title( 'test-1', response )
  assert_equals( 1, response.forms.size )

  form = response.form

  # test form of HTML page contents
  assert_equals( 'ntext',     form.parameters[0].name )
  assert_equals( 'npassword', form.parameters[1].name )

  # execute CGI script, after setting parameters
  form.parameters[0].value = "this is test"
  form.parameters[1].value = '!@#$%'
  response = form.submit

  # test output from CGI script
  assert_equals( 'result', response.title )
  assert_equals( 1, response.links.size )
  assert_equals( 'http://....', response.links[0] )

  # read link
  response = response.links[0].read

=end