File: upper_n_.rb

package info (click to toggle)
ruby-gettext 3.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,284 kB
  • ctags: 1,287
  • sloc: ruby: 9,178; makefile: 8
file content (68 lines) | stat: -rw-r--r-- 735 bytes parent folder | download | duplicates (6)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# -*- coding: utf-8 -*-

require 'gettext'
include GetText

class TestRubyParser_N
  bindtextdomain("testN_rubyparser", :path => "locale")

  def testN_1
    N_("aaa")
  end

  def testN_2
    N_("aaa\n")
  end

  def testN_3
    N_("bbb\nccc")
  end

  def testN_4
     N_("bbb
ccc
ddd
")
  end

  def testN_5
    N_("eee")
  end

  def testN_6
    N_("eee") + "foo" + N_("fff")
  end

  def testN_7
    N_("ggg"\
      "hhh"\
      "iii")
  end

  def testN_8
    N_('a"b"c"')
  end

  def testN_9
    N_("d\"e\"f\"")
  end

  def testN_10
    N_("jjj") +
    N_("kkk")
  end

  def testN_11
    N_("lll" + "mmm")
  end

  def testN_12
    puts N_(msg), "ppp"  #Ignored
  end

  def testN_13
    N_("nnn\n" +
      "ooo")
  end
end