Add test case for issue #11681
auto merge of #11929 : FlaPer87/rust/issue-11681, r=huonw

closes #11681