Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 10
- Log:
Checking in HEAD from RForum's SVN of 22-Jul-2006, 8pm (revision 906).
- Author:
- adh
- Date:
- Sat Jul 22 20:02:44 +0100 2006
- Size:
- 1221 Bytes
- Properties:
- Property svn:executable is set
1 | #!/bin/env ruby |
2 | |
3 | require File.dirname(__FILE__) + '/../test_helper' |
4 | |
5 | class LocalizationTest < Test::Unit::TestCase |
6 | |
7 | include RForum::Localization |
8 | |
9 | # TODO: shouldn't use production data for tests |
10 | # require File.dirname(__FILE__) + '/../test_helper' |
11 | TRANSLATION_TABLE = LOCALIZED_STRINGS['en'] |
12 | |
13 | def test_normal_translation |
14 | assert_equal TRANSLATION_TABLE[:available_forums], l(:available_forums) |
15 | end |
16 | |
17 | def test_unknown_string |
18 | assert_equal 'test_symbol_that_has_no_traslation', l(:test_symbol_that_has_no_traslation) |
19 | end |
20 | |
21 | def test_with_arguments |
22 | assert_match /an argument/, l(:registration_email_sent, 'an argument') |
23 | end |
24 | |
25 | def test_missing_an_expected_argument |
26 | assert_raise (ArgumentError) { l(:registration_email_sent) } |
27 | end |
28 | |
29 | def test_arguments_as_array |
30 | assert_match /an argument/, l([:registration_email_sent, 'an argument']) |
31 | end |
32 | |
33 | def test_arguments_empty_array |
34 | assert_raise(ArgumentError) { l([]) } |
35 | end |
36 | |
37 | def test_array_and_arguments |
38 | assert_raise(ArgumentError) { l([:email_sent, 'an argument'], 'some more arguments') } |
39 | end |
40 | |
41 | def test_LString_to_s |
42 | # was a silly bug |
43 | assert_nothing_raised { LString.new(:email_sent, 'an argument').to_s } |
44 | end |
45 | |
46 | end |