~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to test/ruby/test_whileuntil.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2006-05-08 22:23:12 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060508222312-w2wqeaz030ifi59j
Tags: 1.9.0+20060423-3ubuntu1
* Resynchronized with Debian.
* Only change from Debian is the addition of
  debian/patches/903_sparc_fix_define.patch to fix illegal instructions
  at runtime on sparc. (change from 1.9.0+20050921-1ubuntu1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    tmp.close
32
32
 
33
33
    tmp = open("while_tmp", "r")
34
 
    while tmp.gets()
35
 
      line = $_
36
 
      gsub(/vt100/, 'VT100')
37
 
      if $_ != line
38
 
        $_.gsub!('VT100', 'Vt100')
 
34
    while line = tmp.gets()
 
35
      lastline = line
 
36
      line = line.gsub(/vt100/, 'VT100')
 
37
      if lastline != line
 
38
        line.gsub!('VT100', 'Vt100')
39
39
        redo
40
40
      end
41
 
      assert_no_match(/vt100/, $_)
42
 
      assert_no_match(/VT100/, $_)
 
41
      assert_no_match(/vt100/, line)
 
42
      assert_no_match(/VT100/, line)
43
43
    end
44
44
    assert(tmp.eof?)
45
45
    tmp.close