Closed droundy closed 6 years ago
I could really use this. Perhaps as a start to shrinking PathBuf
, it could be .pop()
'd and the .pop()
'd path could be added to the shrinker if .pop()
returned true?
I addressed my feedback, squashed this down to one commit and merged it here: https://github.com/BurntSushi/quickcheck/commit/af95aabd9af57b3de6aed2067118cb1df9fc941b
Hello, I just implemented hopefully a reasonable Arbitrary for PathBuf (and incidentally OsString). The PathBuf arbitrary tries to get somewhat interesting and/or realistic paths, but doesn't try to hard (e.g. it will *extremely** rarely pick a path like foo/../bar. But it does get realistic prefixes (hopefully), and shouldn't do anything too insane.
I also added *~ to gitignore.