You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 29, 2021. It is now read-only.
assert_cmd!(rm foo.bar) is equivalent to assert_cmd!(rm foo . bar).
See simplified Playground example. This is due to current limitations of the macro system. Macros can not access information about whitespaces. Period.
But quotations #15 won't work as expected either assert_cmd!(rm "foo.bar") will run rm "\"foo.bar\"".
rm: cannot remove '"foo.bar"': No such file or directory
This turns out to be way more problematic than initially thought...
Interpreting arguments as expressions is also problematic.
In this world assert_cmd!(rm "foo.bar") would work
but assert_cmd!(rm foo) could have serious side effects, e.g. if let foo = "/ -r"
This morning I made the following observation:
assert_cmd!(rm foo.bar)is equivalent toassert_cmd!(rm foo . bar).See simplified Playground example. This is due to current limitations of the macro system. Macros can not access information about whitespaces. Period.
But quotations #15 won't work as expected either
assert_cmd!(rm "foo.bar")will runrm "\"foo.bar\"".This turns out to be way more problematic than initially thought...
Interpreting arguments as expressions is also problematic.
assert_cmd!(rm "foo.bar")would workassert_cmd!(rm foo)could have serious side effects, e.g. iflet foo = "/ -r"This situation doesn't look good at all.