Initialize a repo (default view `dev`) with a base file recorded on `dev`.
()
| 32 | |
| 33 | /// Initialize a repo (default view `dev`) with a base file recorded on `dev`. |
| 34 | fn repo_with_base() -> TempDir { |
| 35 | let dir = TempDir::new().expect("tempdir"); |
| 36 | let root = dir.path(); |
| 37 | assert!(atomic(root, &["init"]).status.success(), "init"); |
| 38 | std::fs::write(root.join("base.txt"), b"base\n").unwrap(); |
| 39 | assert!( |
| 40 | atomic(root, &["add", "base.txt"]).status.success(), |
| 41 | "add base" |
| 42 | ); |
| 43 | assert!( |
| 44 | atomic(root, &["record", "-m", "base"]).status.success(), |
| 45 | "record base" |
| 46 | ); |
| 47 | dir |
| 48 | } |
| 49 | |
| 50 | /// Create a draft view `feature` (parent = dev), switch to it, and record a |
| 51 | /// change unique to that view. |
no test coverage detected