source: mod_gnutls/test/newtest

asyncio
Last change on this file was 59328d0, checked in by Fiona Klute <fiona.klute@…>, 2 months ago

newtest: Style cleanup

  • Property mode set to 100755
File size: 823 bytes
Line 
1#!/bin/bash
2
3tname="${1// /_}"
4
5confirmed=0
6
7while [ "${confirmed}" -eq 0 ]; do
8    read -e -p "Describe your new test briefly: " -i "${tname}" TEST_NAME
9    tname="${TEST_NAME// /_}"
10
11    declare -i newnum=0
12    while [ -d tests/$(printf "%02d_*" "${newnum}") ]; do
13        newnum=$((newnum + 1))
14    done
15    newname="$(printf "%02d_%s" "${newnum}" "${tname}")"
16
17    read -p "Your new test will be named tests/$newname. OK? [Y/n]"
18    if [ -z "${REPLY}" ] || [ "${REPLY,}" == "y" ]; then
19        confirmed=1
20    fi
21done
22
23cp -a tests/00_basic "tests/${newname}"
24# derive script name, the actual script will be generated by make
25newscript="test-${newname}.bash"
26
27echo "You can now edit ${newname}."
28echo "Run the test with TESTS=\"${newscript}\" make -e check."
29echo "When ready, add ${newscript} to test_scripts in Makefile.am."
Note: See TracBrowser for help on using the repository browser.