Added test script for #667