RouterOS version?
if you not use $variable, you must put the quotes and ";" at the end....
/export file="test";
mine is V6.12
no different with your suggested change, I don't think this is related to the syntax.
Could you please state the version which works with it?