Add xtests for new git ignored status deducing logic

This commit is contained in:
ariasuni 2021-04-10 01:06:22 +02:00
parent bd4f144884
commit bfd2644869
19 changed files with 51 additions and 20 deletions

View File

@ -300,6 +300,8 @@ touch "ignoreds/music.m4a"
mkdir "ignoreds/nested"
touch "ignoreds/nested/70s grove.mp3"
touch "ignoreds/nested/funky chicken.m4a"
mkdir "ignoreds/nested2"
touch "ignoreds/nested2/ievan polkka.mp3"
mkdir "target"
touch "target/another ignored file"

View File

@ -101,13 +101,21 @@ status = 0
tags = [ 'long', 'git' ]
[[cmd]]
name = "exa --git -l with an ignored directory argument does not flag the contents as ignored"
name = "exa --git -l with an ignored directory argument flags the contents as ignored"
shell = "exa --git -l /testcases/git2/target"
stdout = { file = "outputs/git2_long_ignoreddir.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'long', 'git' ]
[[cmd]]
name = "exa --git -l --list-dirs with a directory argument doesnt flag it as ignored if only the content is"
shell = "exa --git -l --list-dirs /testcases/git2/ignoreds/nested2"
stdout = { file = "outputs/git2_long_ignoredcontent.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'long', 'git' ]
[[cmd]]
name = "exa --git -l with a nested repository argument uses the sub-repository rules"
shell = "exa --git -l /testcases/git2/deeply/nested/repository"
@ -155,7 +163,7 @@ status = 0
tags = [ 'long', 'git' ]
[[cmd]]
name = "exa --git -l shows a Git status column for multiple repositories across multiple directories"
name = "exa --git -l shows a Git status column for multiple repositories across multiple directories 2"
shell = "exa --git -l /testcases/{git2/deeply/nested/directory,git/edits,git2/target,git2/deeply,git}"
stdout = { file = "outputs/git1+2_long_nested.ansitxt" }
stderr = { empty = true }

View File

@ -8,7 +8,7 @@
.rw-rw-r-- 20 cassowary  1 Jan 12:34 -M unstaged
/testcases/git2/target:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- another ignored file
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I another ignored file
/testcases/git2/deeply:
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested

View File

@ -1 +1 @@
music.m4a nested
music.m4a nested nested2

View File

@ -1,2 +1,3 @@
music.m4a
nested
nested2

View File

@ -1,2 +1,3 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 music.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 nested
drwxrwxr-x - cassowary  1 Jan 12:34 nested2

View File

@ -1 +1 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 music.m4a drwxrwxr-x - cassowary  1 Jan 12:34 nested
.rw-rw-r-- 0 cassowary  1 Jan 12:34 music.m4a drwxrwxr-x - cassowary  1 Jan 12:34 nested drwxrwxr-x - cassowary  1 Jan 12:34 nested2

View File

@ -1,5 +1,8 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 music.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 nested
drwxrwxr-x - cassowary  1 Jan 12:34 nested2
/testcases/git2/ignoreds/nested:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 funky chicken.m4a
/testcases/git2/ignoreds/nested2:

View File

@ -1,4 +1,5 @@
drwxrwxr-x - cassowary  1 Jan 12:34 /testcases/git2/ignoreds
.rw-rw-r-- 0 cassowary  1 Jan 12:34 ├── music.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 └── nested
.rw-rw-r-- 0 cassowary  1 Jan 12:34  └── funky chicken.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 ├── nested
.rw-rw-r-- 0 cassowary  1 Jan 12:34 │ └── funky chicken.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 └── nested2

View File

@ -1,4 +1,5 @@
/testcases/git2/ignoreds
├── music.m4a
└── nested
 └── funky chicken.m4a
├── nested
│ └── funky chicken.m4a
└── nested2

View File

@ -0,0 +1 @@
drwxrwxr-x - cassowary  1 Jan 12:34 -- /testcases/git2/ignoreds/nested2

View File

@ -1 +1 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- another ignored file
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I another ignored file

View File

@ -1,3 +1,4 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N music.m4a
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I music.mp3
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested
drwxrwxr-x - cassowary  1 Jan 12:34 -- nested2

View File

@ -5,6 +5,7 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N music.m4a
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I music.mp3
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested
drwxrwxr-x - cassowary  1 Jan 12:34 -- nested2
/testcases/git2/target:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- another ignored file
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I another ignored file

View File

@ -20,10 +20,14 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N music.m4a
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I music.mp3
drwxrwxr-x - cassowary  1 Jan 12:34 -N nested
drwxrwxr-x - cassowary  1 Jan 12:34 -- nested2
/testcases/git2/ignoreds/nested:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I 70s grove.mp3
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N funky chicken.m4a
/testcases/git2/ignoreds/nested2:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I ievan polkka.mp3
/testcases/git2/target:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -- another ignored file
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I another ignored file

View File

@ -18,6 +18,9 @@
/testcases/git2/ignoreds:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 music.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 nested
drwxrwxr-x - cassowary  1 Jan 12:34 nested2
/testcases/git2/ignoreds/nested:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 funky chicken.m4a
/testcases/git2/ignoreds/nested2:

View File

@ -9,8 +9,10 @@
drwxrwxr-x - cassowary  1 Jan 12:34 -N ├── ignoreds
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N │ ├── music.m4a
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I │ ├── music.mp3
drwxrwxr-x - cassowary  1 Jan 12:34 -N │ └── nested
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I │ ├── 70s grove.mp3
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N │ └── funky chicken.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 -N │ ├── nested
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I │ │ ├── 70s grove.mp3
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -N │ │ └── funky chicken.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 -- │ └── nested2
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I │ └── ievan polkka.mp3
drwxrwxr-x - cassowary  1 Jan 12:34 -I └── target
.rw-rw-r-- 0 cassowary  1 Jan 12:34 --  └── another ignored file
.rw-rw-r-- 0 cassowary  1 Jan 12:34 -I  └── another ignored file

View File

@ -8,5 +8,6 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 │ └── subfile
drwxrwxr-x - cassowary  1 Jan 12:34 └── ignoreds
.rw-rw-r-- 0 cassowary  1 Jan 12:34  ├── music.m4a
drwxrwxr-x - cassowary  1 Jan 12:34  └── nested
.rw-rw-r-- 0 cassowary  1 Jan 12:34  └── funky chicken.m4a
drwxrwxr-x - cassowary  1 Jan 12:34  ├── nested
.rw-rw-r-- 0 cassowary  1 Jan 12:34  │ └── funky chicken.m4a
drwxrwxr-x - cassowary  1 Jan 12:34  └── nested2

View File

@ -8,5 +8,6 @@
│ └── subfile
└── ignoreds
 ├── music.m4a
 └── nested
 └── funky chicken.m4a
 ├── nested
 │ └── funky chicken.m4a
 └── nested2