Server IP : 66.29.132.122 / Your IP : 3.15.228.246 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/gettext-3.2.2/test/ |
Upload File : |
# -*- coding: utf-8 -*- class Foo end class TestGetTextBind < Test::Unit::TestCase def setup GetText.locale = "ja_JP.EUC-JP" @dumped_all_text_domains = GetText::TextDomainManager.dump_all_text_domains GetText::TextDomainManager.clear_all_text_domains end def teardown GetText::TextDomainManager.restore_all_text_domains(@dumped_all_text_domains) end def test_bindtextdomain domain = GetText.bindtextdomain("foo") assert_equal domain, GetText::TextDomainManager.create_or_find_text_domain_group(Object).text_domains[0] assert_equal domain, GetText::TextDomainManager.text_domain_pool("foo") end def test_textdomain domain1 = GetText.bindtextdomain("foo") assert_equal domain1, GetText.textdomain("foo") assert_raise(GetText::NoboundTextDomainError) { GetText.textdomain_to(Foo, "bar") } end def test_textdomain_to domain1 = GetText.bindtextdomain("foo") assert_equal domain1, GetText.textdomain_to(Foo, "foo") assert_raise(GetText::NoboundTextDomainError) { GetText.textdomain_to(Foo, "bar") } end end