Issue with String Comparison (if)

Hi,
I was trying to do a string comparison using if. However, the comparison result is getting treated as a executable statement. I'm not sure where I'm making the mistake!

$ typeset TEST_VAR='YUP'
$ if [$TEST_VAR='YUP']; then echo 'Got It!'; fi;
ksh: [YUP=YUP]: not found.

Any help is appreciated!

pay attention to spaces...

if [ $TEST_VAR = 'YUP' ]; then echo 'Got It!'; fi;

this worked for me:

#!/usr/bin/bash
typeset TEST_VAR="YUP"
if [ $TEST_VAR == "YUP" ] 
then 
echo 'GOT IT!' 
fi

Thanks vgersh99 and npatwardhan! :b:
The issue was indeed due to the spaces.

Worked fine when spaces included near the .