Skip to content

Commit

Permalink
tests: don't have cargo install test tools
Browse files Browse the repository at this point in the history
I noticed that `cargo install --path .` will install the new
`fake-editor` and `fake-diff-editor` binaries. We don't want that, so
let's move them into a separate crate. The tests still find them
without needing any modification.
  • Loading branch information
martinvonz committed Apr 20, 2022
1 parent 5e729ec commit 957e09b
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 9 deletions.
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,12 @@ categories = ["command-line-utilities", "development-tools"]
name = "jj"
path = "src/main.rs"

[[bin]]
name = "fake-editor"
path = "testing/fake-editor.rs"

[[bin]]
name = "fake-diff-editor"
path = "testing/fake-diff-editor.rs"

[[bench]]
name = "diff_bench"
harness = false

[workspace]
members = ["lib"]
members = ["lib", "testing"]

[dependencies]
assert_cmd = "2.0.4"
Expand Down
24 changes: 24 additions & 0 deletions testing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "jujutsu-testing"
version = "0.4.0"
authors = ["Martin von Zweigbergk <martinvonz@google.com>"]
edition = "2021"
rust-version = "1.57"
license = "Apache-2.0"
description = "Library for Jujutsu (an experimental VCS)"
homepage = "https://github.com/martinvonz/jj"
repository = "https://github.com/martinvonz/jj"
documentation = "https://docs.rs/jujutsu"
readme = "../README.md"

[[bin]]
name = "fake-editor"
path = "src/fake-editor.rs"

[[bin]]
name = "fake-diff-editor"
path = "src/fake-diff-editor.rs"

[dependencies]
clap = { version = "3.1.10", features = ["derive"] }
itertools = "0.10.3"
File renamed without changes.
File renamed without changes.

0 comments on commit 957e09b

Please sign in to comment.