| 1 |
#!/bin/sh -e |
| 2 |
|
| 3 |
. ../client/confmodule |
| 4 |
|
| 5 |
db_capb progresscancel |
| 6 |
|
| 7 |
db_info progress/info |
| 8 |
|
| 9 |
db_progress start 0 100 progress/title |
| 10 |
|
| 11 |
for i in $(seq 10 -1 1); do |
| 12 |
db_subst progress/step i $i |
| 13 |
db_progress info progress/step |
| 14 |
sleep 1 |
| 15 |
db_progress step 10 |
| 16 |
done |
| 17 |
|
| 18 |
# Nested progress bars aren't supported, but check that the UI doesn't break |
| 19 |
# too badly anyway (see #391676). |
| 20 |
db_progress start 0 5 progress/nested/title |
| 21 |
for i in $(seq 1 5); do |
| 22 |
db_subst progress/nested/step i $i |
| 23 |
db_progress info progress/nested/step |
| 24 |
sleep 1 |
| 25 |
db_progress step 1 |
| 26 |
done |
| 27 |
db_progress set 5 |
| 28 |
db_progress stop |
| 29 |
|
| 30 |
# Since nested progress bars aren't supported, there'll be a black screen |
| 31 |
# from here on in. |
| 32 |
|
| 33 |
db_capb |
| 34 |
db_progress set 100 |
| 35 |
sleep 1 |
| 36 |
|
| 37 |
db_progress stop |
| 38 |
|
| 39 |
# Test for GO while doing PROGRESS as it can happen with |
| 40 |
# debconf-apt-progress |
| 41 |
|
| 42 |
db_capb progresscancel |
| 43 |
db_progress start 0 3 progress/title |
| 44 |
for i in $(seq 1 3); do |
| 45 |
db_subst progress/step i $i |
| 46 |
db_progress info progress/step |
| 47 |
if [ "$i" = 2 ]; then |
| 48 |
db_settitle test/info |
| 49 |
db_fset test/string seen false |
| 50 |
db_input high test/string |
| 51 |
db_go |
| 52 |
fi |
| 53 |
sleep 1 |
| 54 |
db_progress step 1 |
| 55 |
done |
| 56 |
|
| 57 |
db_stop |
| 58 |
sleep 1 |
| 59 |
exit 0 |