"Fossies" - the Fresh Open Source Software Archive

Member "lessfs-1.7.0/regression/pjd-fstest-20080816-lessfs/tests/symlink/00.t" (29 Mar 2008, 752 Bytes) of package /linux/misc/old/lessfs-1.7.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 # $FreeBSD: src/tools/regression/fstest/tests/symlink/00.t,v 1.1 2007/01/17 01:42:11 pjd Exp $
    3 
    4 desc="symlink creates symbolic links"
    5 
    6 dir=`dirname $0`
    7 . ${dir}/../misc.sh
    8 
    9 echo "1..14"
   10 
   11 n0=`namegen`
   12 n1=`namegen`
   13 
   14 expect 0 create ${n0} 0644
   15 expect regular,0644 lstat ${n0} type,mode
   16 expect 0 symlink ${n0} ${n1}
   17 expect symlink lstat ${n1} type
   18 expect regular,0644 stat ${n1} type,mode
   19 expect 0 unlink ${n0}
   20 expect ENOENT stat ${n1} type,mode
   21 expect 0 unlink ${n1}
   22 
   23 expect 0 mkdir ${n0} 0755
   24 time=`${fstest} stat ${n0} ctime`
   25 sleep 1
   26 expect 0 symlink test ${n0}/${n1}
   27 mtime=`${fstest} stat ${n0} mtime`
   28 test_check $time -lt $mtime
   29 ctime=`${fstest} stat ${n0} ctime`
   30 test_check $time -lt $ctime
   31 expect 0 unlink ${n0}/${n1}
   32 expect 0 rmdir ${n0}