tests: more test coverage for mutable global variables