Add test for #10618 and #16382

Closes #10618
Closes #16382
auto merge of #16697 : Sawyer47/rust/new-test, r=huonw

Closes #10618
Closes #16382