added test

per edit
Merge pull request #1 from akloeckner/patch-1

looks good