rustpkg: Add test for #7348. Closes #7348