Blame tests/p_file/03_file_mime_symlink.sh

Ranjib Dey e0701f
#!/bin/bash
Christoph Galuschka 37e507
# Author:	???
Christoph Galuschka 37e507
#	  Christoph Galuschka <christoph.galuschka@chello.at>
Ranjib Dey e0701f
Ranjib Dey e0701f
t_Log "Running $0 - checking if file can recognize symlink mime file type "
Ranjib Dey e0701f
Athmane Madjoudj 571a6c
TEST_FILE_PATH="/tmp/p_file_link_test"
Athmane Madjoudj 571a6c
Athmane Madjoudj 571a6c
ln -s /etc/hosts $TEST_FILE_PATH
Athmane Madjoudj 571a6c
Rene Diepstraten f3ae57
case $centos_ver in
Rene Diepstraten f3ae57
  5)
Rene Diepstraten f3ae57
    mimetype='x-not-regular-file'
Rene Diepstraten f3ae57
    ;;
Rene Diepstraten f3ae57
  6)
Rene Diepstraten f3ae57
    mimetype='application/x-symlink'
Rene Diepstraten f3ae57
    ;;
Rene Diepstraten f3ae57
  *)
Rene Diepstraten f3ae57
    mimetype='inode/symlink'
Rene Diepstraten f3ae57
    ;;
Rene Diepstraten f3ae57
esac
Rene Diepstraten f3ae57
Rene Diepstraten f3ae57
file -i $TEST_FILE_PATH | grep -q $mimetype
Rene Diepstraten f3ae57
ret_val=$?
Ranjib Dey e0701f
Christoph Galuschka 37e507
t_CheckExitStatus $ret_val