Lines Matching full:bar
28 tester('ntpath.splitext("foo.bar.ext")', ('foo.bar', '.ext'))
29 tester('ntpath.splitext("xx/foo.bar.ext")', ('xx/foo.bar', '.ext'))
30 tester('ntpath.splitext("xx\\foo.bar.ext")', ('xx\\foo.bar', '.ext'))
34 tester('ntpath.splitdrive("c:\\foo\\bar")',
35 ('c:', '\\foo\\bar'))
36 tester('ntpath.splitdrive("c:/foo/bar")',
37 ('c:', '/foo/bar'))
38 tester('ntpath.splitdrive("\\\\conky\\mountpoint\\foo\\bar")',
39 ('\\\\conky\\mountpoint', '\\foo\\bar'))
40 tester('ntpath.splitdrive("//conky/mountpoint/foo/bar")',
41 ('//conky/mountpoint', '/foo/bar'))
42 tester('ntpath.splitdrive("\\\\\\conky\\mountpoint\\foo\\bar")',
43 ('', '\\\\\\conky\\mountpoint\\foo\\bar'))
44 tester('ntpath.splitdrive("///conky/mountpoint/foo/bar")',
45 ('', '///conky/mountpoint/foo/bar'))
46 tester('ntpath.splitdrive("\\\\conky\\\\mountpoint\\foo\\bar")',
47 ('', '\\\\conky\\\\mountpoint\\foo\\bar'))
48 tester('ntpath.splitdrive("//conky//mountpoint/foo/bar")',
49 ('', '//conky//mountpoint/foo/bar'))
51 self.assertEqual(ntpath.splitdrive(u'//conky/MOUNTPOİNT/foo/bar'),
52 (u'//conky/MOUNTPOİNT', '/foo/bar'))
56 tester('ntpath.splitunc("c:\\foo\\bar")',
57 ('', 'c:\\foo\\bar'))
58 tester('ntpath.splitunc("c:/foo/bar")',
59 ('', 'c:/foo/bar'))
60 tester('ntpath.splitunc("\\\\conky\\mountpoint\\foo\\bar")',
61 ('\\\\conky\\mountpoint', '\\foo\\bar'))
62 tester('ntpath.splitunc("//conky/mountpoint/foo/bar")',
63 ('//conky/mountpoint', '/foo/bar'))
64 tester('ntpath.splitunc("\\\\\\conky\\mountpoint\\foo\\bar")',
65 ('', '\\\\\\conky\\mountpoint\\foo\\bar'))
66 tester('ntpath.splitunc("///conky/mountpoint/foo/bar")',
67 ('', '///conky/mountpoint/foo/bar'))
68 tester('ntpath.splitunc("\\\\conky\\\\mountpoint\\foo\\bar")',
69 ('', '\\\\conky\\\\mountpoint\\foo\\bar'))
70 tester('ntpath.splitunc("//conky//mountpoint/foo/bar")',
71 ('', '//conky//mountpoint/foo/bar'))
73 self.assertEqual(ntpath.splitunc(u'//conky/MOUNTPO%cNT/foo/bar' % 0x0130),
74 (u'//conky/MOUNTPO%cNT' % 0x0130, u'/foo/bar'))
77 tester('ntpath.split("c:\\foo\\bar")', ('c:\\foo', 'bar'))
78 tester('ntpath.split("\\\\conky\\mountpoint\\foo\\bar")',
79 ('\\\\conky\\mountpoint\\foo', 'bar'))
92 tester('ntpath.isabs("\\foo\\bar")', 1)
188 env["foo"] = "bar"
192 tester('ntpath.expandvars("$foo bar")', "bar bar")
193 tester('ntpath.expandvars("${foo}bar")', "barbar")
194 tester('ntpath.expandvars("$[foo]bar")', "$[foo]bar")
195 tester('ntpath.expandvars("$bar bar")', "$bar bar")
196 tester('ntpath.expandvars("$?bar")', "$?bar")
197 tester('ntpath.expandvars("$foo}bar")', "bar}bar")
201 tester('ntpath.expandvars("$bar$bar")', "$bar$bar")
202 tester('ntpath.expandvars("%foo% bar")', "bar bar")
203 tester('ntpath.expandvars("%foo%bar")', "barbar")
206 tester('ntpath.expandvars("%?bar%")', "%?bar%")
207 tester('ntpath.expandvars("%foo%%bar")', "bar%bar")
208 tester('ntpath.expandvars("\'%foo%\'%bar")', "\'%foo%\'%bar")
209 tester('ntpath.expandvars("bar\'%foo%")', "bar\'%foo%")
224 check('$spam bar', '%s bar' % snonascii)
225 check('$%s bar' % snonascii, '$%s bar' % snonascii)
226 check('${spam}bar', '%sbar' % snonascii)
227 check('${%s}bar' % snonascii, 'ham%sbar' % snonascii)
228 check('$spam}bar', '%s}bar' % snonascii)
229 check('$%s}bar' % snonascii, '$%s}bar' % snonascii)
230 check('%spam% bar', '%s bar' % snonascii)
231 check('%{}% bar'.format(snonascii), 'ham%s bar' % snonascii)
232 check('%spam%bar', '%sbar' % snonascii)
233 check('%{}%bar'.format(snonascii), 'ham%sbar' % snonascii)
261 tester('ntpath.expanduser("~test\\foo\\bar")',
262 'C:\\idle\\test\\foo\\bar')
263 tester('ntpath.expanduser("~test/foo/bar")',
264 'C:\\idle\\test/foo/bar')
265 tester('ntpath.expanduser("~\\foo\\bar")',
266 'C:\\idle\\eric\\foo\\bar')
267 tester('ntpath.expanduser("~/foo/bar")',
268 'C:\\idle\\eric/foo/bar')
297 tester('ntpath.relpath("/foo/bar/bat", "/x/y/z")', '..\\..\\..\\foo\\bar\\bat')
298 tester('ntpath.relpath("/foo/bar/bat", "/foo/bar")', 'bat')
299 tester('ntpath.relpath("/foo/bar/bat", "/")', 'foo\\bar\\bat')
300 tester('ntpath.relpath("/", "/foo/bar/bat")', '..\\..\\..')
301 tester('ntpath.relpath("/foo/bar/bat", "/x")', '..\\foo\\bar\\bat')
302 tester('ntpath.relpath("/x", "/foo/bar/bat")', '..\\..\\..\\x')