debian/masterdebian/stretch-backportsjessie-backportsupstream
Last change
on this file since e3cbda4 was
4b53371,
checked in by Daniel Kahn Gillmor <dkg@…>, 7 years ago
|
initial testing framework, with one simple test.
|
-
Property mode set to
100755
|
File size:
568 bytes
|
Rev | Line | |
---|
[4b53371] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | TEST_NAME="$1" |
---|
| 4 | |
---|
| 5 | confirmed=0 |
---|
| 6 | |
---|
| 7 | while [ "$confirmed" -eq 0 ]; do |
---|
| 8 | |
---|
| 9 | read -e -p "describe your new test briefly: " -i "$tname" TEST_NAME |
---|
| 10 | |
---|
| 11 | tname="${TEST_NAME// /_}" |
---|
| 12 | newname="$(printf "%02d_%s" "$(( $(ls -d tests/* | sed 's|^[^/]*/\([0-9]*\)_.*|\1|' | sort -n | tail -n 1 | sed s/^0//) + 1 ))" "$tname")" |
---|
| 13 | |
---|
| 14 | read -p "your new test will be named tests/$newname. OK [Y/n]? " |
---|
| 15 | if [ "$REPLY" == "" ] || [ "${REPLY/Y/y}" == "y" ]; then |
---|
| 16 | confirmed=1 |
---|
| 17 | fi |
---|
| 18 | done |
---|
| 19 | |
---|
| 20 | cp -a tests/00_basic "tests/$newname" |
---|
| 21 | |
---|
| 22 | printf "You can now edit %s\n" "$newname" |
---|
Note: See
TracBrowser
for help on using the repository browser.