For example:
Furthermore, the situation, that our tests simply start modifying already existing config files, is not ideal.
Two ways to resolve this:
I think the most simple solution would be to reserve a certain prefix for MSR config file names. For example, we could just require that every config file name we use in (Markdown) Shell Recorder tests has to start with the text tests_.
A constant prefix might reduce the likelihood but in my case it would not have been helpful: all the cases I had up to now were leftovers from unsuccessful or aborted previous test runs.
Shellrecorder is the only place where we can give guarantees about files not being there and being cleaned up in the end.
鈥ll the cases I had up to now where leftovers from unsuccessful or aborted previous test runs.
In that case the second solution you proposed above:
- the shell recorder prefixes the names of the config files
does not fix the problem either.
Depends on the prefix: mktemp or uuid should suffice for any practical purpose.
On my computer, some testcases again fail because of this problem. It is not so easy to find out which left-over file causes the problem. It would be great to see a fix here.
I had again this problem (~/.config/tutorial.dump) was present. It would be great if shell recorder could have better support to deal with this problem.