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 69 70 71 72 73 74 75 76 77
|
# -*- coding: utf-8 -*-
require 'gettext'
include GetText
class TestRubyParser_Nn
bindtextdomain("testNn_rubyparser", :path => "locale")
def testNn_1
Nn_("aaa", "aaas")
end
def testNn_2
Nn_("aaa\n", "aaas\n")
end
def testNn_3
Nn_("bbb\nccc", "bbbs\ncccs")
end
def testNn_4
Nn_("bbb
ccc
ddd
",
"bbbs
cccs
ddds
")
end
def testNn_5
Nn_("eee", "eees")
end
def testNn_6
Nn_("eee", "eees") + "foo" + Nn_("fff", "fffs")
end
def testNn_7
Nn_("ggg"\
"hhh"\
"iii",
"gggs"\
"hhhs"\
"iiis")
end
def testNn_8
Nn_('a"b"c"', 'as"bs"cs"')
end
def testNn_9
Nn_("d\"e\"f\"", "ds\"es\"fs\"")
end
def testNn_10
Nn_("jjj", "jjjs") +
Nn_("kkk", "kkks")
end
def testNn_11
Nn_("lll" + "mmm", "llls" + "mmms")
end
def testNn_12
puts Nn_(msg, msgs), "ppp" #Ignored
end
def testNn_13
Nn_("nnn\n" +
"ooo",
"nnns\n" +
"ooos")
end
end
|