Skip to content

Commit a643ff9

Browse files
committed
Add test for duplicates
1 parent 823dbcd commit a643ff9

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

run_tests

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
#
3+
4+
errors=0
5+
6+
for file in ./tests/* ; do
7+
if [[ -e "$file" ]] ; then
8+
echo "$file"
9+
echo "--"
10+
bash "$file" ; ((errors += $?))
11+
echo ""
12+
fi
13+
done
14+
15+
if [[ "$errors" -ne 0 ]] ; then
16+
echo "Test failures: $errors"
17+
exit "$errors"
18+
fi

tests/no_dupes

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
#
3+
4+
exts="$(dircolors LS_COLORS | head -n1 | sed 's/=[^:]*//g ; s/:/\n/g')"
5+
exts_sorted="$(sort <<< "$exts")"
6+
exts_uniq="$(sort -u <<< "$exts")"
7+
8+
diff --color=auto --text --report-identical-files <(echo "$exts_uniq") <(echo "$exts_sorted")

0 commit comments

Comments
 (0)