aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ranger/container/test_fsobject.py27
1 files changed, 23 insertions, 4 deletions
diff --git a/tests/ranger/container/test_fsobject.py b/tests/ranger/container/test_fsobject.py
index 2c6a693f..d2c9a770 100644
--- a/tests/ranger/container/test_fsobject.py
+++ b/tests/ranger/container/test_fsobject.py
@@ -21,15 +21,34 @@ def create_filesystem_object(path):
def test_basename_natural1():
"""Test filenames without extensions."""
- fsos = [create_filesystem_object(path)
- for path in ("hello", "hello1", "hello2")]
+ fsos = [
+ create_filesystem_object(path)
+ for path in (
+ "0", "1", "2", "3",
+ "10", "11", "12", "13",
+ "100", "101", "102", "103",
+ "110", "111", "112", "113",
+ "hello",
+ "hello1", "hello2",
+ "hello11", "hello12",
+ "hello100", "hello101", "hello111", "hello112",
+ )
+ ]
assert fsos == sorted(fsos[::-1], key=operator.attrgetter("basename_natural"))
assert fsos == sorted(fsos[::-1], key=operator.attrgetter("basename_natural_lower"))
def test_basename_natural2():
"""Test filenames with extensions."""
- fsos = [create_filesystem_object(path)
- for path in ("hello", "hello.txt", "hello1.txt", "hello2.txt")]
+ fsos = [
+ create_filesystem_object(path)
+ for path in (
+ "hello", "hello.txt",
+ "hello0.txt", "hello1.txt", "hello2.txt", "hello3.txt"
+ "hello10.txt", "hello11.txt", "hello12.txt", "hello13.txt"
+ "hello100.txt", "hello101.txt", "hello102.txt", "hello103.txt"
+ "hello110.txt", "hello111.txt", "hello112.txt", "hello113.txt"
+ )
+ ]
assert fsos == sorted(fsos[::-1], key=operator.attrgetter("basename_natural"))
assert fsos == sorted(fsos[::-1], key=operator.attrgetter("basename_natural_lower"))