Missing update of test.txt before update-index

In code snippets one update of a file, that apparently should be updated in index is missing.
My first pull request ever on GitHub.