Skip to content

Commit

Permalink
test: Add with_submodule directory
Browse files Browse the repository at this point in the history
  • Loading branch information
llllvvuu committed Apr 23, 2024
1 parent c949bb5 commit 2527365
Show file tree
Hide file tree
Showing 35 changed files with 503 additions and 252 deletions.
19 changes: 19 additions & 0 deletions devtools/dir-generator.sh
Expand Up @@ -133,6 +133,25 @@ touch icons/man.1 --date=@0
touch icons/marked.md --date=@0
# END test_icons

# BEGIN submodule
cd git/*01 || exit
git add "*01"
# git doesn't allow us to create a submodule without a branch
GIT_COMMITTER_NAME="Your Name" GIT_COMMITTER_EMAIL="your@email.com" git commit --author="Your Name <your@email.com>" -m "Initial commit"
cd .. || exit

mkdir -p with_submodule
cd with_submodule || exit
git init
seq 01 10 | split -l 1 -a 3 -d - file_
git -c protocol.file.allow=always submodule add ../*01
touch --date=@0 ./*;
touch --date=@0 ./*01/*;
cd .. || exit
ln -s with_submodule with_submodule_symlink
cd .. || exit
# END submodule

# BEGIN set date
touch --date=@0 ./*;
# END set date
50 changes: 0 additions & 50 deletions tests/gen/absolute_recurse_unix.stdout

This file was deleted.

22 changes: 0 additions & 22 deletions tests/gen/absolute_unix.stdout

This file was deleted.

File renamed without changes.
13 changes: 13 additions & 0 deletions tests/gen/ignore_submodule_contents_long_recursive.stdout
@@ -0,0 +1,13 @@
drwxr-xr-x - nixbld 1 Jan 1970 001
.rw-r--r-- 2 nixbld 1 Jan 1970 file_000
.rw-r--r-- 2 nixbld 1 Jan 1970 file_001
.rw-r--r-- 2 nixbld 1 Jan 1970 file_002
.rw-r--r-- 2 nixbld 1 Jan 1970 file_003
.rw-r--r-- 2 nixbld 1 Jan 1970 file_004
.rw-r--r-- 2 nixbld 1 Jan 1970 file_005
.rw-r--r-- 2 nixbld 1 Jan 1970 file_006
.rw-r--r-- 2 nixbld 1 Jan 1970 file_007
.rw-r--r-- 2 nixbld 1 Jan 1970 file_008
.rw-r--r-- 3 nixbld 1 Jan 1970 file_009

tests/test_dir/git/with_submodule/001:
2 changes: 2 additions & 0 deletions tests/gen/ignore_submodule_contents_long_recursive.toml
@@ -0,0 +1,2 @@
bin.name = "eza"
args = "tests/test_dir/git/with_submodule -R --long --ignore-submodule-contents"
File renamed without changes.
13 changes: 13 additions & 0 deletions tests/gen/ignore_submodule_contents_recursive.stdout
@@ -0,0 +1,13 @@
001
file_000
file_001
file_002
file_003
file_004
file_005
file_006
file_007
file_008
file_009

tests/test_dir/git/with_submodule/001:
2 changes: 2 additions & 0 deletions tests/gen/ignore_submodule_contents_recursive.toml
@@ -0,0 +1,2 @@
bin.name = "eza"
args = "tests/test_dir/git/with_submodule -R --ignore-submodule-contents"
Empty file.
13 changes: 13 additions & 0 deletions tests/gen/ignore_submodule_contents_recursive_symlink.stdout
@@ -0,0 +1,13 @@
001
file_000
file_001
file_002
file_003
file_004
file_005
file_006
file_007
file_008
file_009

tests/test_dir/git/with_submodule_symlink/001:
2 changes: 2 additions & 0 deletions tests/gen/ignore_submodule_contents_recursive_symlink.toml
@@ -0,0 +1,2 @@
bin.name = "eza"
args = "tests/test_dir/git/with_submodule_symlink -R --ignore-submodule-contents"
Empty file.
12 changes: 12 additions & 0 deletions tests/gen/ignore_submodule_contents_tree.stdout
@@ -0,0 +1,12 @@
tests/test_dir/git/with_submodule
├── 001
├── file_000
├── file_001
├── file_002
├── file_003
├── file_004
├── file_005
├── file_006
├── file_007
├── file_008
└── file_009
2 changes: 2 additions & 0 deletions tests/gen/ignore_submodule_contents_tree.toml
@@ -0,0 +1,2 @@
bin.name = "eza"
args = "tests/test_dir/git/with_submodule --tree --ignore-submodule-contents"
20 changes: 19 additions & 1 deletion tests/gen/long_links_recurse_unix.stdout
@@ -1,4 +1,4 @@
12 git
13 git
1002 grid
2 group
2 icons
Expand All @@ -19,6 +19,8 @@ tests/test_dir/git:
3 008
3 009
3 010
4 with_submodule
1 with_submodule_symlink -> with_submodule

tests/test_dir/git/001:
1 file_000
Expand Down Expand Up @@ -140,6 +142,22 @@ tests/test_dir/git/010:
1 file_008
1 file_009

tests/test_dir/git/with_submodule:
2 001
1 file_000
1 file_001
1 file_002
1 file_003
1 file_004
1 file_005
1 file_006
1 file_007
1 file_008
1 file_009

tests/test_dir/git/with_submodule/001:
1 file_001

tests/test_dir/grid:
2 0001
2 0002
Expand Down
6 changes: 6 additions & 0 deletions tests/gen/only_dir_recursive_long_unix.stdout
Expand Up @@ -19,6 +19,7 @@ tests/test_dir/git:
008
009
010
with_submodule

tests/test_dir/git/001:

Expand All @@ -40,6 +41,11 @@ tests/test_dir/git/009:

tests/test_dir/git/010:

tests/test_dir/git/with_submodule:
001

tests/test_dir/git/with_submodule/001:

tests/test_dir/grid:
0001
0002
Expand Down
6 changes: 6 additions & 0 deletions tests/gen/only_dir_recursive_unix.stdout
Expand Up @@ -19,6 +19,7 @@ tests/test_dir/git:
008
009
010
with_submodule

tests/test_dir/git/001:

Expand All @@ -40,6 +41,11 @@ tests/test_dir/git/009:

tests/test_dir/git/010:

tests/test_dir/git/with_submodule:
001

tests/test_dir/git/with_submodule/001:

tests/test_dir/grid:
0001
0002
Expand Down
18 changes: 18 additions & 0 deletions tests/gen/recursive_long_unix.stdout
Expand Up @@ -19,6 +19,8 @@ tests/test_dir/git:
008
009
010
with_submodule
with_submodule_symlink -> with_submodule

tests/test_dir/git/001:
file_000
Expand Down Expand Up @@ -140,6 +142,22 @@ file_007
file_008
file_009

tests/test_dir/git/with_submodule:
001
file_000
file_001
file_002
file_003
file_004
file_005
file_006
file_007
file_008
file_009

tests/test_dir/git/with_submodule/001:
file_001

tests/test_dir/grid:
0001
0002
Expand Down
18 changes: 18 additions & 0 deletions tests/gen/recursive_unix.stdout
Expand Up @@ -19,6 +19,8 @@ tests/test_dir/git:
008
009
010
with_submodule
with_submodule_symlink -> with_submodule

tests/test_dir/git/001:
file_000
Expand Down Expand Up @@ -140,6 +142,22 @@ file_007
file_008
file_009

tests/test_dir/git/with_submodule:
001
file_000
file_001
file_002
file_003
file_004
file_005
file_006
file_007
file_008
file_009

tests/test_dir/git/with_submodule/001:
file_001

tests/test_dir/grid:
0001
0002
Expand Down
36 changes: 25 additions & 11 deletions tests/gen/tree_long_unix.stdout
Expand Up @@ -99,17 +99,31 @@ tests/test_dir
│ │ ├── file_007
│ │ ├── file_008
│ │ └── file_009
│ └── 010
│ ├── file_000
│ ├── file_001
│ ├── file_002
│ ├── file_003
│ ├── file_004
│ ├── file_005
│ ├── file_006
│ ├── file_007
│ ├── file_008
│ └── file_009
│ ├── 010
│ │ ├── file_000
│ │ ├── file_001
│ │ ├── file_002
│ │ ├── file_003
│ │ ├── file_004
│ │ ├── file_005
│ │ ├── file_006
│ │ ├── file_007
│ │ ├── file_008
│ │ └── file_009
│ ├── with_submodule
│ │ ├── 001
│ │ │ └── file_001
│ │ ├── file_000
│ │ ├── file_001
│ │ ├── file_002
│ │ ├── file_003
│ │ ├── file_004
│ │ ├── file_005
│ │ ├── file_006
│ │ ├── file_007
│ │ ├── file_008
│ │ └── file_009
│ └── with_submodule_symlink -> with_submodule
├── grid
│ ├── 0001
│ ├── 0002
Expand Down
36 changes: 25 additions & 11 deletions tests/gen/tree_unix.stdout
Expand Up @@ -99,17 +99,31 @@ tests/test_dir
│ │ ├── file_007
│ │ ├── file_008
│ │ └── file_009
│ └── 010
│ ├── file_000
│ ├── file_001
│ ├── file_002
│ ├── file_003
│ ├── file_004
│ ├── file_005
│ ├── file_006
│ ├── file_007
│ ├── file_008
│ └── file_009
│ ├── 010
│ │ ├── file_000
│ │ ├── file_001
│ │ ├── file_002
│ │ ├── file_003
│ │ ├── file_004
│ │ ├── file_005
│ │ ├── file_006
│ │ ├── file_007
│ │ ├── file_008
│ │ └── file_009
│ ├── with_submodule
│ │ ├── 001
│ │ │ └── file_001
│ │ ├── file_000
│ │ ├── file_001
│ │ ├── file_002
│ │ ├── file_003
│ │ ├── file_004
│ │ ├── file_005
│ │ ├── file_006
│ │ ├── file_007
│ │ ├── file_008
│ │ └── file_009
│ └── with_submodule_symlink -> with_submodule
├── grid
│ ├── 0001
│ ├── 0002
Expand Down

0 comments on commit 2527365

Please sign in to comment.