source: mod_gnutls/t/newtest @ 480aba1

asynciodebian/masterdebian/stretch-backportsjessie-backportsmainmsvaproxy-ticketupstream
Last change on this file since 480aba1 was 4b53371, checked in by Daniel Kahn Gillmor <dkg@…>, 10 years ago

initial testing framework, with one simple test.

  • Property mode set to 100755
File size: 568 bytes
Line 
1#!/bin/bash
2
3TEST_NAME="$1"
4
5confirmed=0
6
7while [ "$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
18done
19
20cp -a tests/00_basic "tests/$newname"
21
22printf "You can now edit %s\n" "$newname"
Note: See TracBrowser for help on using the repository browser.