mkvtoolnix/tests/new_test
Moritz Bunkus f0b0ec70c7 Create SimpleTest classes on the fly instead of using class variables in the base class
...which doesn't work if more than one test is run simultaneously.
2012-01-31 18:59:27 +01:00

38 lines
483 B
Bash
Executable File

#!/bin/zsh
if [ "$1" = "" ]; then
echo 'Name?'
exit 1
fi
name="${1%.rb}"
max_num=(test*(.On[1]))
let next_num=${max_num[1][6,8]}+1
new_file="test-${next_num}${name}.rb"
cat > "$new_file" <<EOF
#!/usr/bin/ruby -w
# T_${next_num}${name}
describe "FIXTHIS"
setup do
# FIXTHIS
end
cleanup do
# FIXTHIS
end
test_merge "data/FIXTHIS"
test_merge "data/FIXTHIS", :args => "FIXTHIS"
test "data/FIXTHIS" do
# INSERT COMMANDS
hash_tmp
end
EOF
echo "New file is $new_file"