
# Number test.


echo "**** Numeric comparisons."
x=5
y=10

echo -n "test -eq: "
if (test $x -eq $y)  then
    echo "X = Y."
else
    echo "X != Y. Expected."
fi

echo -n "test -eq: "
if (test $x -eq $x)  then
    echo "X  = X. Expected."
else
    echo "X != X. "
fi

echo -n "test -eq: "
if (test $x -eq 5)  then
    echo "X  = 5. Expected."
else
    echo "X != 5. "
fi

echo -n "test -eq: "
if (test $x -eq "5")  then
   echo "X = \"5\". Expected."
else
    echo "X != \"5\". "
fi


echo -n "test -ne: "
if (test $x -ne 5)  then
    echo "X != 5. "
else    
    echo "X  = 5. Expected."
fi


echo -n "test -ne: "
if (test $x -ne $y)  then   
    echo "X != Y. Expected."
else
    echo "X = Y."
fi

# Note extra ! for "not".
echo -n "test -ne: "
if (test ! $x -eq $y)  then   
    echo "X != Y. Expected."
else
    echo "X = Y."
fi



