Tests for variable substitution