File: test-get-changeset.sh

package info (click to toggle)
tla 1.3.5%2Bdfsg1-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, stretch
  • size: 22,292 kB
  • ctags: 11,952
  • sloc: ansic: 149,771; sh: 16,009; xml: 2,689; lisp: 1,927; makefile: 1,064; cpp: 363; tcl: 230; awk: 48; sed: 25
file content (52 lines) | stat: -rw-r--r-- 1,211 bytes parent folder | download | duplicates (7)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
# -*- mode: sh; coding: utf-8 -*-
# Simple update tests
# Written by Aaron Bentley <aaron.bentley@utoronto.ca>
# Copyright © 2004 Canonical Inc
#
# This file is licensed under the General Public License v2, or at your
# preference, any later version.

set -e

arg0="$0"
srcdir=`dirname "$arg0"`

. ${srcdir}/test-framework

test_class "get-changeset"
setup_with_patch_1 ()
{
  setup_with_trivial_archives
  tla get jane@example.com--2003/hello-world--mainline--1.0--base-0 hw-2
  tla my-default-archive jane@example.com--2003
  tla commit -d hw-2 -s "Need a changeset"
}
begin_test_savectx "get-changeset in a working-tree"

setup_with_patch_1
cd hw-2
tla get-changeset jane@example.com--2003/hello-world--mainline--1.0--patch-1

cd ..
end_test_savectx

begin_test_savectx "get-changeset outside of a working-tree"
setup_with_patch_1

tla get-changeset hello-world--mainline--1.0--patch-1
cd hw-2
tla update
cd ..
end_test_savectx

begin_test_savectx "get-changeset with no default archive"
setup_with_patch_1
tla my-default-archive -d
tla get-changeset jane@example.com--2003/hello-world--mainline--1.0--patch-1
cd hw-2
tla update
cd ..
end_test_savectx

# tag: b6682352-b119-4f7b-ad49-ca21aef11c56