The way to test it is to add the input into a file, and then redirect stdin from this file. An example would be a string like
"Hello Wold!" and check that we get the correct string. The <LEFT ARROW> and <DELETE> are meant to be the corresponding escape sequences for those keys.