bash-framework/src/condition.test.sh
2022-08-16 15:24:46 +07:00

25 lines
303 B
Bash

#!/bin/bash
. ./condition.sh
# equal
if [ $(equal 1 1) -eq 1 ]
then
echo "equal numeric"
fi
if [[ $(equal 1 2) -eq 0 ]]
then
echo "not equal numeric"
fi
if [[ $(equal "asdf" "asdf") -eq 1 ]]
then
echo "equal string"
fi
if [[ $(equal "asdf" "asdf1") -eq 0 ]]
then
echo "not equal string"
fi