Page 1 of 1

Lister: "Search hex string" should inform of incorrect text

Posted: 2024-02-06, 17:30 UTC
by Slavic
Search hex string is a good option when we need to find a binary sequence in a file. However, it does not always inform about unsuccessful result. This happens when the text sample, input in the search box, cannot be properly converted to hex values, often by mistake or mistype.

For example, let open for view the file HISTORY.TXT from TC, set the hex string search mode and input the text: 0d0a32
Lister immediately finds the first line starting from symbol "2": 0d0a is CRLF (next line), 32 is hex code of "2".
Modify the search text to odoa32 (replace zero with small letter "o" in 2 places).
Lister informs that text is not found, it looks like correct result, but the sample text is not a hex sequence.
Modify the search to od0a32 (replace only first zero with "o"). Lister finds nothing and shows no error. This is definitely wrong.

Lister should check that search text can be converted to hex characters and inform about error, which will allow a user to easily fix the mistake. In particular, both odoa32 and od0a32 should result in the same error message.

Re: Lister: "Search hex string" should inform of incorrect text

Posted: 2024-02-06, 18:41 UTC
by Sir_SiLvA
Slavic wrote: 2024-02-06, 17:30 UTC Lister informs that text is not found, it looks like correct result, but the sample text is not a hex sequence.
Sorry thats a "you-problem". You should be able to insert a correct code and not make it TCs job if you are able to do so :!:
Otherwise you want next TC to check if a user enters reg-ex correcty, etc
Slavic wrote: 2024-02-06, 17:30 UTCModify the search to od0a32 (replace only first zero with "o"). Lister finds nothing and shows no error. This is definitely wrong.
This is correct and should be fixed.
I doesnt give an error message but still makes an error PING-sound.

Re: Lister: "Search hex string" should inform of incorrect text

Posted: 2024-02-08, 08:34 UTC
by browny
Sir_SiLvA wrote: 2024-02-06, 18:41 UTC Sorry thats a "you-problem".
Incorrect. Basic input checking is a common and preferable practice.
Sir_SiLvA wrote: 2024-02-06, 18:41 UTC Otherwise you want next TC to check if a user enters reg-ex correcty, etc
This is covered; there would be a messagebox in case of a bad regular expression.
Slavic wrote: 2024-02-06, 17:30 UTC I doesnt give an error message but still makes an error PING-sound.
Sound-only diagnostic is not that great; visual indication is more natural - because it is GUI.