mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-06-12 19:55:17 +02:00
fix(filesystem): render root folder path correctly
This commit is contained in:
parent
ec96812e6b
commit
8ae94ade19
2 changed files with 17 additions and 2 deletions
|
|
@ -106,6 +106,17 @@ def test_find_maxdepth_zero_type_directory_returns_start_folder(tmp_path):
|
|||
assert [row["path"] for row in rows] == ["/documents"]
|
||||
|
||||
|
||||
def test_find_directory_output_renders_root_without_double_slash(tmp_path):
|
||||
executor = _register_find_fixture(tmp_path)
|
||||
executor.json_output = False
|
||||
|
||||
output = executor.execute("find / -maxdepth 1 -type d")
|
||||
|
||||
assert output.splitlines()[0] == "/ folders=1 files=0"
|
||||
assert "//" not in output
|
||||
assert "/documents/ folders=1 files=1" in output
|
||||
|
||||
|
||||
def test_find_maxdepth_combines_with_where_and_limit(tmp_path):
|
||||
executor = _register_find_fixture(tmp_path)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue