openenvutils/commandshell/shell/test/scripts/ls.sh
changeset 0 2e3d3ce01487
child 1 0fdb7f6b0309
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 #opyright (c) Symbian Software Ltd 2007. All rights reserved.
       
     2 #!/home/guest/vinodp/local/bin/zsh
       
     3 ###################################
       
     4 # Test cases for internal commands#
       
     5 ###################################
       
     6 
       
     7 
       
     8 #Inititalise counters for Total tests, passes, fails.
       
     9 init()
       
    10 {
       
    11 let totalno=0;
       
    12 let passno=0;
       
    13 let failno=0;
       
    14 return
       
    15 }
       
    16 
       
    17 
       
    18 #Start test case for defect DEF115281 
       
    19 test_ls_long()
       
    20 {
       
    21 
       
    22 let totalno=totalno+1
       
    23 
       
    24 ls -l
       
    25 ret=$?
       
    26 
       
    27 if [ $ret = 0 ]
       
    28 then
       
    29  echo "Is ls -l command given here showing the contents properly\(y\/n\):"
       
    30  read yesorno
       
    31  if [ $yesorno = "y" ]
       
    32  then
       
    33    echo "PASS"
       
    34    let passno=passno+1
       
    35  else
       
    36    echo "FAIL: Expected \"y\", returned $yesorno"
       
    37    let failno=failno+1
       
    38  fi
       
    39 else
       
    40  echo "FAIL: Expected return value 0, but  returned $ret"
       
    41  let failno=failno+1
       
    42 fi
       
    43 return
       
    44 }
       
    45 
       
    46 
       
    47 
       
    48 report()
       
    49 {
       
    50 echo "#######################################################################################"
       
    51 echo "Total tests : $totalno"
       
    52 echo "Passed      : $passno"
       
    53 echo "Failed      : $failno"
       
    54 echo "#######################################################################################"
       
    55 }
       
    56 
       
    57 
       
    58 
       
    59 init
       
    60 test_ls_long
       
    61 report