test is no program to test if your shell script works. test is used with or without "if" for example, to test if a condition is true or not, to implement a logical flow into scripts. In your script, that smells like homework/classroom stuff, are some loads of "if" tests already. Best talk to your teacher again and tell him that your task is not clear to you.
By the rules of this forum, homework/classroom stuff is forbidden:
ok, thanks a lot, i will remove this from here, any way now i do understand what you was want to say, it did help me in a way.... the thing is i have a script file which record everything what i did and test everything and the script works very well, and when it didn't i had errors which i fix them up. thank you very much for your help