~willismonroe/ubuntu/precise/xdg-utils/typo-fix-996304

« back to all changes in this revision

Viewing changes to tests/xdg-icon-resource/t.icon_user_install

  • Committer: Bazaar Package Importer
  • Author(s): Per Olofsson
  • Date: 2006-08-29 17:35:02 UTC
  • Revision ID: james.westby@ubuntu.com-20060829173502-ffe063dqe8ajg2rm
Tags: upstream-1.0~beta3
ImportĀ upstreamĀ versionĀ 1.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
## Include utility functions.
 
4
. "$XDG_TEST_DIR/include/testassertions.sh"
 
5
 
 
6
. "$XDG_TEST_DIR/include/testcontrol.sh"
 
7
 
 
8
## Test function
 
9
test_icon_user_install() {
 
10
test_start "$FUNCNAME: verify $ICON is installed correctly"
 
11
 
 
12
## Begin the test.
 
13
userpath="$HOME/.icons:$HOME/.local:$XDG_DATA_HOME"
 
14
 
 
15
# Dependencies section
 
16
test_init
 
17
 
 
18
set_no_display
 
19
use_file "$XDG_TEST_DIR/icons/$ICON" ICONFILE
 
20
assert_file "$ICONFILE"
 
21
 
 
22
# Verify the test icon is not installed already.
 
23
assert_file_not_in_path "$ICONFILE" "$userpath"
 
24
 
 
25
# Test steps section
 
26
test_procedure
 
27
 
 
28
assert_exit 0 xdg-icon-resource install --mode user --size "$SIZE" "$ICONFILE"
 
29
assert_nostdout
 
30
assert_nostderr
 
31
 
 
32
assert_file_in_path "$ICONFILE" "$userpath"
 
33
 
 
34
xdg-icon-resource uninstall --mode user --size "$SIZE" "$ICONFILE"
 
35
 
 
36
test_result
 
37
 
38
 
 
39
repeat_test test_icon_user_install 2 ICON SIZE 'red-16.png' 'red-22.png' 'red-24.png' 'red-32.png' 'red-48.png' 'red-64.png' 'red-128.png' 16 22 24 32 48 64 128