(native: bool)
| 97 | } |
| 98 | |
| 99 | fn preinit_record(native: bool) { |
| 100 | let f = Fixture::new(true); |
| 101 | let ignore = fs::read(f.root.path().join(".atomicignore")).unwrap(); |
| 102 | fs::write(f.root.path().join("tracked.txt"), b"edit\n").unwrap(); |
| 103 | let mut args = vec!["record", "-am", "edit"]; |
| 104 | if native { |
| 105 | // This option uses the native command path rather than the local service. |
| 106 | args.push("--allow-conflict-markers"); |
| 107 | } |
| 108 | f.atomic(&args); |
| 109 | f.assert_content("main", "tracked.txt", b"edit\n"); |
| 110 | f.assert_content("main", ".atomicignore", &ignore); |
| 111 | assert_eq!(f.git(&["show", "HEAD:tracked.txt"]), "edit\n"); |
| 112 | assert!(f.atomic(&["status", "--short"]).trim().is_empty()); |
| 113 | assert!(f.git(&["status", "--porcelain"]).trim().is_empty()); |
| 114 | f.atomic(&["git", "shim", "reconcile"]); |
| 115 | f.assert_content("main", "tracked.txt", b"edit\n"); |
| 116 | } |
| 117 | |
| 118 | #[test] |
| 119 | fn native_addition_keeps_private_snapshot_conflict_cache_current() { |
no test coverage detected