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
Christoph Galuschka 37e507
if (t_GetPkgRel basesystem | grep -q el5)
Christoph Galuschka 37e507
  then
Athmane Madjoudj 571a6c
  file -i $TEST_FILE_PATH | grep -q 'x-not-regular-file'
Christoph Galuschka 37e507
  ret_val=$?
Christoph Galuschka 37e507
else
Athmane Madjoudj 571a6c
  file -i $TEST_FILE_PATH | grep -q 'application/x-symlink'
Christoph Galuschka 37e507
  ret_val=$?
Christoph Galuschka 37e507
fi
Ranjib Dey e0701f
Christoph Galuschka 37e507
t_CheckExitStatus $ret_val