Blob Blame History Raw
#!/bin/bash
echo "Running $0"
TMPDIR=/var/tmp/find
# Basic xargs tests

echo "Basic xargs tests"
find "$TMPDIR" -type f -print0  | xargs  -0 ls &>/dev/null 
#ls  -l >/dev/null
t_CheckExitStatus $?

echo "Check xargs fails when filenames with spaces are passed in"
find "$TMPDIR" -type f | xargs ls &>/dev/null  && { t_Log "FAIL: This test returned 0 status incorrectly"; exit $FAIL; }
t_Log "PASS"


# Cleanup
[[ -d "$TMPDIR" ]] && rm -rf "$TMPDIR"