1 # Copyright (C) 2010 Red Hat, Inc. All rights reserved.
3 # This copyrighted material is made available to anyone wishing to use,
4 # modify, copy, or redistribute it subject to the terms and conditions
5 # of the GNU General Public License v.2.
7 # You should have received a copy of the GNU General Public License
8 # along with this program; if not, write to the Free Software Foundation,
9 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15 class TestLog < Test::Unit::TestCase
19 def remove_timestamps(l)
20 l.gsub(/\[[^\]]*\]/, '')
25 StringIO.open do |out|
32 assert_equal("I, INFO -- : msg1\nW, WARN -- : msg2\nD, DEBUG -- : msg3\n",
33 remove_timestamps(out.string))