Add a test for #8035; patch from errge
Add expected output for T8035