archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / ruby-log4r / repos / community-any / fix-broken-test.patch
blob5f954e11f88791b4f82440b4fcbc64ab893f8d42
1 diff --git a/tests/testformatter.rb b/tests/testformatter.rb
2 index 673c8dd..4ff70a1 100644
3 --- a/tests/testformatter.rb
4 +++ b/tests/testformatter.rb
5 @@ -12,7 +12,7 @@ class TestFormatter < TestCase
6 sf = SimpleFormatter.new
7 f = Logger.new('simple formatter')
8 event = LogEvent.new(0, f, nil, "some data")
9 - assert_match(sf.format(event), /simple formatter/)
10 + assert_match(/simple formatter/, sf.format(event))
11 end
12 def test_basic_formatter
13 b = BasicFormatter.new
14 @@ -20,12 +20,12 @@ class TestFormatter < TestCase
15 event = LogEvent.new(0, f, caller, "fake formatter")
16 event2 = LogEvent.new(0, f, nil, "fake formatter")
17 # this checks for tracing
18 - assert_match(b.format(event), /in/)
19 - assert_not_match(b.format(event2), /in/)
20 + assert_match(/in/, b.format(event))
21 + assert_not_match(/in/, b.format(event2))
22 e = ArgumentError.new("argerror")
23 e.set_backtrace ['backtrace']
24 event3 = LogEvent.new(0, f, nil, e)
25 - assert_match(b.format(event3), /ArgumentError/)
26 - assert_match(b.format(LogEvent.new(0,f,nil,[1,2,3])), /Array/)
27 + assert_match(/ArgumentError/, b.format(event3))
28 + assert_match(/Array/, b.format(LogEvent.new(0,f,nil,[1,2,3])))
29 end
30 end