cargo-open icon indicating copy to clipboard operation
cargo-open copied to clipboard

Add tests for different kinds of crate installations

Open carols10cents opened this issue 9 years ago • 0 comments

In main.rs, add unit tests for the cargo_dir function that checks that it returns the correct directory for different kinds of crates that have been installed, like:

  • A crate specified with * as its version
  • A crate specified with a particular version
  • A crate installed from github
  • A crate installed from a local path
  • A crate that we have a local override set up for

This may require setting up some infrastructure similar to what cargo does for its tests in order to be able to create temporary directories that contain different kinds of projects.

carols10cents avatar Oct 04 '15 17:10 carols10cents