1# Place holder for real tests.
2from PyObjCTools.TestSupport import *
3import objc
4
5from Foundation import NSLocalizedString, NSAutoreleasePool
6
7try:
8    unicode
9except NameError:
10    unicode = str
11
12class TestNSLocalizedString(TestCase):
13    def testBasic(self):
14        # This is mostly a regression tests, the function used to crash on
15        # this...
16        if objc.platform != 'MACOSX':
17            return
18
19        pool = NSAutoreleasePool.alloc().init()
20        s = NSLocalizedString(b"hello world".decode('ascii'), b"".decode('ascii'))
21        del pool
22        self.assertEqual (s, b"hello world".decode('ascii'))
23        # XXX : Since we get the same object back, it's still unicode
24        #self.assertEqual (s.nsstring().description(), b"hello world".decode('ascii'))
25
26if __name__ == '__main__':
27    main( )
28