Add tests for `spaces` and `tok`

Not correctly handling the "0 spaces" case doesn't cause problems until much later in the module. So, I added some tests to check it.