Add brief test for calc unit checking, inspired by https://bugzilla.mozilla.org/show_bug.cgi?id=1041994 .