Added test for scalar reference in input/output