File: test-update.sh

package info (click to toggle)
tla 1.3.5%2Bdfsg1-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, 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 (51 lines) | stat: -rw-r--r-- 1,098 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
#!/bin/sh
# -*- mode: sh; coding: utf-8 -*-
# Simple update tests
# Written by James Blackwell <jblack@inframix.com>
# 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 "update"
  
setup_hello_world ()
{
  setup_with_trivial_archives
  tla get jane@example.com--2003/hello-world--mainline--1.0 hello-world-1

  cd hello-world-1

  sed -e 's/Hello World/Hello, World/' < hello-world.c > hello-world.c.new
  mv hello-world.c.new hello-world.c
  tla commit -L 'correctly punctuate'

  cd ..
}

begin_test_savectx "solitary update"
setup_hello_world
tla get jane@example.com--2003/hello-world--mainline--1.0--base-0 hw-2
cd hw-2
tla update
cd ..
end_test_savectx


begin_test_savectx "update with -d dirname"
setup_hello_world
tla get jane@example.com--2003/hello-world--mainline--1.0--base-0 hw-3

tla update -d hw-3 
end_test_savectx "update with -d dirname"



# tag: DO_NOT_CHANGE James Blackwell Mon Aug 16 07:02:51 EDT 2004