Added tests for usage as a global (towards #15)