You are welcome, Enil,
I'm glad you confirmed that DH has set up the wildcard DNS for your domain. That is where it all has to start.
I understand - (edited to remove incorrect info - I misunderstood the original poster and originally wrote an incorrect response - Oops!) This does tend to indicate the wildcard DNS has been set-up
Yes, if, and only if, neither enil.domain.com nor parker.domain.com exist. If either of those subdomains exist, then the appropriate index (directory listing, index page, etc) of those sub-domains will be displayed in response to the request (a request for enil.domain.com will show the index for enil.domain.com, and a request for parker.domain.com will show the index for parker.domain.com).
I understand, but what I am trying to explain is that .htaccess re-write rules and re-directs is not they way to do this if path /home/enil/enil.domain.com/ and /home/enil/parker.domain.com/ are sub-domains, and /home/enil/domain.com is your "main" domain. Re-write rules installed in each of those "domains" will work to intercept and redirect requests received at *each of those domains, but a request for one of those domains will not be received by the others - which is why you need wildcard DNS to "redirect upon fail' if a subdomain is looked for but not found.
If test.domain.com exists, it is possible that test.domain.com subdomain DNS has not yet propagated, which would account for why you are ending up at the same domain.com index no when you browse to test.domain.com or domain.com.
If that is not working, it does not appear that the wildcard DNS is working properly. If Dreamhost has set it up for you, it is not working correctly, and I do not believe you can "fix" it with .htaccess re-write rules.
If you have set up a test.domain.com sub-domain, and DNS for it has propagated, the appropriate index should be displayed if the sub-domain exists, otherwise, the index of domain.com should be displayed.
If all the set-ups have propagated and it is not behaving that way, you should contact DH again and have them investigate further.