aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gems/gettext-2.1.0/test/testlib/sgettext.rb
blob: 050e266bf9b9e57d1915e3627d4a90dbca540144 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
require 'gettext'

class TestSGetText
  include GetText
  bindtextdomain("sgettext", :path => "locale")

  def test_1
    s_("AAA|BBB")
  end
  
  def test_2
    sgettext("AAA|BBB")
  end
  
  def test_3
    s_("AAA") #not found
  end

  def test_4
    s_("AAA|CCC") #not found
  end

  def test_5
    s_("AAA|BBB|CCC") #not found
  end

  def test_6
    s_("AAA$BBB", "$") #not found
  end

  def test_7
    s_("AAA$B|BB", "$") #not found
  end

  def test_8
    s_("AAA$B|CC", "$")
  end

  def test_9
    s_("AAA|CCC|BBB") #not found
  end

  def setlocale(locale)
    __setlocale(locale)
  end
end