ported another test from perl