Skip to content

Commit a675633

Browse files
committed
Added test for is_relative_path
Signed-off-by: Shivam Chauhan <[email protected]>
1 parent 80f23e7 commit a675633

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/textcode/test_strings.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,12 @@ def test_strings_in_all_bin(self):
182182
test_file = os.path.join(test_dir, tf)
183183
expected_file = os.path.join(expec_dir, tf + '.strings')
184184
self.check_file_strings(test_file, expected_file)
185+
186+
def test_is_relative_path(self):
187+
# Win Path
188+
path = "c:\\usr\\lib\\librt.so.1."
189+
self.assertFalse(strings.is_relative_path(path))
190+
191+
# Relative Posix Path
192+
path = "usr/lib/librt.so.1"
193+
self.assertTrue(strings.is_relative_path(path))

0 commit comments

Comments
 (0)