|
|
@ -42,7 +42,7 @@ function teardown {
|
|
|
|
# File must be a binary:
|
|
|
|
# File must be a binary:
|
|
|
|
local mime
|
|
|
|
local mime
|
|
|
|
mime="$(file --mime-type --mime-encoding "$new_file" | grep 'charset=binary')"
|
|
|
|
mime="$(file --mime-type --mime-encoding "$new_file" | grep 'charset=binary')"
|
|
|
|
[ ! -z "$mime" ]
|
|
|
|
[ -n "$mime" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -61,7 +61,7 @@ function teardown {
|
|
|
|
# File must be a text:
|
|
|
|
# File must be a text:
|
|
|
|
local mime
|
|
|
|
local mime
|
|
|
|
mime="$(file --mime-type --mime-encoding "$new_file" | grep 'charset=us-ascii')"
|
|
|
|
mime="$(file --mime-type --mime-encoding "$new_file" | grep 'charset=us-ascii')"
|
|
|
|
[ ! -z "$mime" ]
|
|
|
|
[ -n "$mime" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -129,15 +129,17 @@ function teardown {
|
|
|
|
# Verify that the second file is there:
|
|
|
|
# Verify that the second file is there:
|
|
|
|
[ -f "$second_file" ]
|
|
|
|
[ -f "$second_file" ]
|
|
|
|
|
|
|
|
|
|
|
|
# cd into the subdir
|
|
|
|
( # start subshell for following commands
|
|
|
|
cd "$root_dir"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Now it should hide 2 files:
|
|
|
|
# cd into the subdir
|
|
|
|
run git secret hide
|
|
|
|
cd "$root_dir"
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
|
|
|
|
|
|
|
# Now it should hide 2 files:
|
|
|
|
|
|
|
|
run git secret hide
|
|
|
|
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
|
|
|
) # end subshell, return to ..
|
|
|
|
|
|
|
|
|
|
|
|
# cd back and clean up
|
|
|
|
# clean up
|
|
|
|
cd ".."
|
|
|
|
|
|
|
|
rm -rf "$root_dir"
|
|
|
|
rm -rf "$root_dir"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|