pijul_org / pijul

test: Add a case for push and pull to another branch than current one

By lthms on May 12, 2018
This patch is not signed.
AmqouuSDoss8h679RNmQUMXZpijXQFQbJJLHXgLrdabiC2bPDQmHQrZMXmvngUtbgse6hWNbr5sX3KqoScbKrdTr
This patch is in the following branches:
latest
master
testing
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bats

load ../test_helper

@test "pull to another branch" {
    mkdir test
    cd test
    pijul init
    echo a > a
    pijul record -A "me" -m "hi" -n -a
    pijul fork test1
    echo b > b
    pijul record -A "me" -m "hi" -n -a
    pijul fork test2
    pijul pull . --from-branch test2 --to-branch master -a
}

@test "push to another branch" {
    mkdir test
    cd test
    pijul init
    echo a > a
    pijul record -A "me" -m "hi" -n -a
    pijul fork test1
    echo b > b
    pijul record -A "me" -m "hi" -n -a
    pijul fork test2
    pijul push . --from-branch test2 --to-branch master -a
}