

set -ex



OUTPUT=$(binsort -t 1 random_binaries | tr "\n" " ")
echo Output is: ${OUTPUT}
if [[ ${OUTPUT} != "random_binaries/0171.bin random_binaries/0000.bin random_binaries/1024.bin random_binaries/0005.bin.symlink random_binaries/0000.bin.symlink random_binaries/0053.bin random_binaries/0005.bin " ]]; then
  echo "Expected: \"random_binaries/0171.bin random_binaries/0000.bin random_binaries/1024.bin random_binaries/0005.bin.symlink random_binaries/0000.bin.symlink random_binaries/0053.bin random_binaries/0005.bin \" [FAIL]"
  echo "     Got: \"${OUTPUT}\" [FAIL]"
  exit 1
fi
exit 0
