test parsing optional & non-optional space