Test case for strings containing other tokens.
fixing the implementation for jsdevel's test case.
adding test cases