This patch adds the test case needed for this function. I have added
few tests. If required more can be added in future.
As discussed in previous version, the testcase patch has been reverted
to the original as the str_replace() functionality has changed wrt to
error handle.
Signed-off-by: Varun Chandramohan <varunc@linux.vnet.ibm.com> Signed-off-by: Josh Stone <jistone@redhat.com>