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
11 require 'string-store'
14 class TestStringStore < Test::Unit::TestCase
16 @ss = StringStore.new(['report-generators/test/strings',
17 'report-generators/test/strings/more_strings'])
21 assert_equal("Hello, world!\n", @ss.lookup(:test1))
22 assert_equal("one\ntwo\nthree", @ss.lookup(:test2))
23 assert_equal("lorem\n", @ss.lookup(:test3))
25 assert_raises(RuntimeError) do
26 @ss.lookup(:unlikely_name)