File: confmodule

package info (click to toggle)
apt-setup 1%3A0.198
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,272 kB
  • sloc: sh: 1,247; makefile: 25
file content (13 lines) | stat: -rw-r--r-- 369 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
# mock debconf functions for shunit2 tests

db_get() {
    var=$(echo $1 | tr -c 'a-zA-Z0-9\n' '_')
    # the ${foo+x} construction checks if $foo is set (including to "") -- otherwise throw an error
    eval "[ \"\${${var}+x}\" ] || return 1"
    eval "RET=\$$var"
}

db_subst() { true; }
db_set() { true; }
db_input() { true; }
db_go() { [ "true" = "$db_go_ret" ]; }