Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrizhu committed Nov 3, 2024
1 parent 9faafdf commit e1bf47b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/excl_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

TRY_TOP="${TRY_TOP:-$(git rev-parse --show-toplevel --show-superproject-working-tree 2>/dev/null || echo "${0%/*}")}"
TRY="$TRY_TOP/try"

cleanup() {
cd ..

if [ -d "$try_workspace" ]
then
echo running
rm -rf "$try_workspace" >/dev/null 2>&1
fi
}

trap 'cleanup' EXIT

# try -E fails in /tmp on too many overlays
try_workspace="$(mktemp -d -p .)"

cd "$try_workspace" || exit 9

touch hidden1
touch nonhidden2

! "$TRY" -n -E hidden1 ls | grep hidden1

0 comments on commit e1bf47b

Please sign in to comment.