]> git.scottworley.com Git - pinch/blame - tests/reject-duplicates.sh
Factor out test setup
[pinch] / tests / reject-duplicates.sh
CommitLineData
ab7ebb2f
SW
1#!/bin/sh
2
a2290fb1
SW
3. ./tests/lib/test-setup.sh
4
5foo_setup
6
7repo_dir1=$repo_dir
8repo1=$repo
9conf1=$conf
10
11foo_setup
ab7ebb2f
SW
12
13python3 ./pinch.py pin "$conf1"
a2290fb1 14python3 ./pinch.py pin "$conf"
ab7ebb2f 15
a2290fb1 16if python3 ./pinch.py update --dry-run "$conf1" "$conf";then
ab7ebb2f
SW
17 echo "FAIL: Duplicate names should be rejected"
18 exit 1
19else
20 echo PASS
21fi
22
a2290fb1
SW
23foo_cleanup
24
25repo_dir=$repo_dir1
26repo=$repo1
27conf=$conf1
ab7ebb2f 28
a2290fb1 29foo_cleanup