trycmd
trycmd copied to clipboard
Should `Action::Overwrite` in `Assert::subset_eq` overwrite files and dirs in expected root?
Maybe I'm missing something or using it wrong, please let me know. Current behaviour is that it just reports ok. Seems unexpected when one wants to prepare a snapshot.
Yes, Overwrite should overwrite existing files when used with subset_eq.
Seems unexpected when one wants to prepare a snapshot.
Overwriting means replacing an existing item. It sounds like you are wanting to write out everything, whether there is an existing item or not. Is that correct?
It sounds like you are wanting to write out everything, whether there is an existing item or not. Is that correct?
Yes, that's correct. To clarify, overwriting works for existing items but does not if a snapshot directory is empty. Thinking about it I can workaround this issue by first running a test to create snapshot files.