Add test for GLOBAL and REDUCE opcodes