'cat' not displaying line breaks
These things can occur based on a whole bunch of small issues, either in the shell used, the terminal application used, the file format or something else altogether.

To triage, the following steps may be useful


run cat -vet test.txt to see whether there are additional characters in the file
run (echo a; echo b)|cat to see if it depending on the input data
switch terminal applications to see if this is the cause
run bash --noprofile to see whether something is lurking in the shell configuration


In my case someone had modified 'cat' behaviour in .bashrc