Add a test for #7776