Code changes
Here are some code changes that from labs 3 and 4.
Have fun!
Number one
The test file that induces this failure is Test File 7
Screenshot of the symptom:
Description:
The code causes an infinite while loop. The changes help resolve the issue of a file containing just )[
to not have an infinite while loop. However, there were still bugs in the code which had to be fixed, but at this point, the changes helped resolve the infinite while loop.
Number two
The test file that induces this failure is Test File 5
Screenshot for the symptom:
Description:
The initial code is structured in such a way that it does not account for the possibility of text appearing in between the end of the link header and the beginning of the link address container, i.e. text in between the ‘]’ and ‘(‘. The altered code tackles this issue by checking specifically for a ](
, which only passes if there is no text between the ‘]’ and ‘(‘.
Number three
The test file that induces this failure is Test File 2.
Screenshot for the symptom:
Description:
The while loop was written in a way without considering the possibility of there being text after the links. This caused the infinite while loop, which is fixed when the while loop stops after finding '('
. This stops the while loop at the end of the link, although it must be noted that this did not produce the right output. It was, however, a step in the right direction.