Compare commits
3 Commits
b2397945f0
...
bb25b4d382
| Author | SHA1 | Date | |
|---|---|---|---|
|
bb25b4d382
|
|||
|
9d1d4c997f
|
|||
|
3c9cb8bd73
|
@@ -404,16 +404,14 @@ mod tests {
|
||||
|
||||
#[tokio::test]
|
||||
async fn describe_fails_outside_repo() {
|
||||
let temp_dir = assert_fs::TempDir::new().unwrap();
|
||||
|
||||
// with_working_dir returns Err when not in a repo
|
||||
let temp_dir = assert_fs::TempDir::new().unwrap();
|
||||
let executor = JjLib::with_working_dir(temp_dir.path()).await;
|
||||
assert!(executor.is_err());
|
||||
|
||||
// Use an executor from a valid repo and try to describe a non-existent revset
|
||||
let executor = JjLib::with_working_dir(std::path::Path::new("."))
|
||||
.await
|
||||
.unwrap();
|
||||
let valid_dir = assert_fs::TempDir::new().unwrap();
|
||||
init_jj_repo(valid_dir.path()).await.expect("Failed to init jj repo");
|
||||
let executor = JjLib::with_working_dir(valid_dir.path()).await.unwrap();
|
||||
let result = executor
|
||||
.describe("this-bookmark-does-not-exist", "test: should fail")
|
||||
.await;
|
||||
@@ -528,9 +526,8 @@ mod tests {
|
||||
|
||||
#[tokio::test]
|
||||
async fn jj_lib_implements_jj_executor_trait() {
|
||||
let lib = JjLib::with_working_dir(std::path::Path::new(".")).await;
|
||||
fn accepts_executor(_: impl JjExecutor) {}
|
||||
accepts_executor(lib.unwrap());
|
||||
fn assert_implements<T: JjExecutor>() {}
|
||||
assert_implements::<JjLib>();
|
||||
}
|
||||
|
||||
mod user_config_paths_tests {
|
||||
|
||||
Reference in New Issue
Block a user