Of course we should keep those tests—if we removed them and someone changed the code to no longer escape the values that were used in the dynamic regex's, the application would break again. That's the point of tests: protect against regressions.