Add test for trailing newline in diff.
Add test for trailing newline in diff.

Credits to @afshinm for most of the code.

graydon/rust,rust-lang/rustfmt,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,SingingTree/rustfmt,graydon/rust,SingingTree/rustfmt,graydon/rust,graydon/rust,rust-lang/rustfmt,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust