Support passing in test names instead of files.
This commit is contained in:
parent
b93ee2885f
commit
71bc1a5679
@ -11,10 +11,14 @@ samples_dir=$(readlink -f "org_mode_samples")
|
||||
function get_test_names {
|
||||
for test_file in "$@"
|
||||
do
|
||||
test_file_full_path=$(readlink -f "$test_file")
|
||||
relative_to_samples=$(realpath --relative-to "$samples_dir" "$test_file_full_path")
|
||||
without_extension="${relative_to_samples%.org}"
|
||||
echo "${without_extension/\//_}"
|
||||
if [ -e "$test_file" ]; then
|
||||
test_file_full_path=$(readlink -f "$test_file")
|
||||
relative_to_samples=$(realpath --relative-to "$samples_dir" "$test_file_full_path")
|
||||
without_extension="${relative_to_samples%.org}"
|
||||
echo "${without_extension/\//_}"
|
||||
else
|
||||
echo "$test_file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user