~sircmpwn/ctools

ref: 16cab053e27d4a7046c005b5becae9b0564d8211 ctools/test/link -rwxr-xr-x 283 bytes
16cab053 — Christopher Vittal Make test scripts POSIX compliant 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
tool="link"
. "$HARNESS"

should_make_link() {
	echo "hello world" >"$TMPDIR"/foo
	link "$TMPDIR"/foo "$TMPDIR"/bar
	[ "$(cat "$TMPDIR"/bar)" = "hello world" ]
	link -- "$TMPDIR"/foo "$TMPDIR"/baz
	[ "$(cat "$TMPDIR"/baz)" = "hello world" ]
}

runtests \
	should_make_link