add test case for fix issue 7976
Merge pull request #2644 from WalterBright/test-for-7976

add test case for fix issue 7976