mkvtoolnix/tests/new_test

40 lines
531 B
Plaintext
Raw Normal View History

#!/bin/zsh
2004-08-19 19:37:07 +00:00
2007-02-20 09:20:38 +00:00
if [ "$1" = "" ]; then
2004-08-19 19:37:07 +00:00
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
2004-08-19 19:37:07 +00:00
#!/usr/bin/ruby -w
2012-01-27 18:29:02 +00:00
class T_${next_num}${name} < SimpleTest
describe "FIXTHIS"
setup do
# FIXTHIS
end
cleanup do
# FIXTHIS
2004-08-19 19:37:07 +00:00
end
2012-01-27 18:29:02 +00:00
test_merge "data/FIXTHIS"
test_merge "data/FIXTHIS", :args => "FIXTHIS"
test "data/FIXTHIS" do
2004-08-19 19:37:07 +00:00
# INSERT COMMANDS
2010-09-01 21:02:38 +00:00
hash_tmp
2004-08-19 19:37:07 +00:00
end
end
EOF
echo "New file is $new_file"