~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to test/ruby/test_fnmatch.rb

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
  def bracket_test(s, t) # `s' should start with neither '!' nor '^'
6
6
    0x21.upto(0x7E) do |i|
7
 
      assert_equal(t.include?(i), File.fnmatch("[#{s}]", i.chr, File::FNM_DOTMATCH))
8
 
      assert_equal(t.include?(i), !File.fnmatch("[^#{s}]", i.chr, File::FNM_DOTMATCH))
9
 
      assert_equal(t.include?(i), !File.fnmatch("[!#{s}]", i.chr, File::FNM_DOTMATCH))
 
7
      assert_equal(t.include?(i.chr), File.fnmatch("[#{s}]", i.chr, File::FNM_DOTMATCH))
 
8
      assert_equal(t.include?(i.chr), !File.fnmatch("[^#{s}]", i.chr, File::FNM_DOTMATCH))
 
9
      assert_equal(t.include?(i.chr), !File.fnmatch("[!#{s}]", i.chr, File::FNM_DOTMATCH))
10
10
    end
11
11
  end
12
12
  def test_fnmatch