cli: Fix a test failing on macos: rad_checkout

This commit is contained in:
Adam Szkoda 2023-02-10 14:39:01 +01:00 committed by Alexis Sellier
parent 488f043226
commit 93ba7f593c
No known key found for this signature in database
4 changed files with 60 additions and 17 deletions

View File

@ -0,0 +1,20 @@
```
$ cd heartwood
```
View the repository configuration:
```
$ cat .git/config
[core]
bare = false
repositoryformatversion = 0
filemode = true
logallrefupdates = true
[remote "rad"]
url = rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
fetch = +refs/heads/*:refs/remotes/rad/*
[branch "master"]
remote = rad
merge = refs/heads/master
```

View File

@ -0,0 +1,22 @@
```
$ cd heartwood
```
View the repository configuration:
```
$ cat .git/config
[core]
bare = false
repositoryformatversion = 0
filemode = true
ignorecase = true
precomposeunicode = true
logallrefupdates = true
[remote "rad"]
url = rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
fetch = +refs/heads/*:refs/remotes/rad/*
[branch "master"]
remote = rad
merge = refs/heads/master
```

View File

@ -57,20 +57,3 @@ $ git show-ref
f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 refs/heads/master
f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 refs/remotes/rad/master
```
View the repository configuration:
```
$ cat .git/config
[core]
bare = false
repositoryformatversion = 0
filemode = true
logallrefupdates = true
[remote "rad"]
url = rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
fetch = +refs/heads/*:refs/remotes/rad/*
[branch "master"]
remote = rad
merge = refs/heads/master
```

View File

@ -122,6 +122,24 @@ fn rad_checkout() {
[],
)
.unwrap();
if cfg!(target_os = "linux") {
test(
"examples/rad-checkout-repo-config-linux.md",
copy.path(),
Some(&profile.home),
[],
)
.unwrap();
} else if cfg!(target_os = "macos") {
test(
"examples/rad-checkout-repo-config-macos.md",
copy.path(),
Some(&profile.home),
[],
)
.unwrap();
}
}
#[test]