mirror of
https://github.com/qwjyh/xdbm
synced 2025-02-24 03:57:06 +09:00
debug(CI): git config
This commit is contained in:
parent
434d4ca952
commit
15da3a1c8a
1 changed files with 13 additions and 0 deletions
13
tests/cli.rs
13
tests/cli.rs
|
@ -41,6 +41,18 @@ mod integrated_test {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn git_config() -> Result<()> {
|
||||||
|
let p = std::process::Command::new("git")
|
||||||
|
.spawn()
|
||||||
|
.context("git spawn")?
|
||||||
|
.wait()
|
||||||
|
.context("running git failed")?
|
||||||
|
.to_string();
|
||||||
|
eprintln!("{}", p);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn single_device() -> Result<()> {
|
fn single_device() -> Result<()> {
|
||||||
let config_dir = assert_fs::TempDir::new()?;
|
let config_dir = assert_fs::TempDir::new()?;
|
||||||
|
@ -52,6 +64,7 @@ mod integrated_test {
|
||||||
.arg("init")
|
.arg("init")
|
||||||
.arg("testdev");
|
.arg("testdev");
|
||||||
cmd.assert().success().stdout(predicate::str::contains(""));
|
cmd.assert().success().stdout(predicate::str::contains(""));
|
||||||
|
eprintln!("{:?}", fs::read_dir(config_dir.path())?.collect::<Vec<_>>());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
std::fs::read_to_string(config_dir.path().join("devname"))?,
|
std::fs::read_to_string(config_dir.path().join("devname"))?,
|
||||||
"testdev\n"
|
"testdev\n"
|
||||||
|
|
Loading…
Reference in a new issue