mkvtoolnix/tests/new_test

38 lines
491 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
2012-03-12 12:45:15 +00:00
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
# T_${next_num}${name}
describe "FIXTHIS"
2012-01-27 18:29:02 +00:00
setup do
# FIXTHIS
end
2012-01-27 18:29:02 +00:00
cleanup do
# FIXTHIS
end
2004-08-19 19:37:07 +00:00
test_merge "data/FIXTHIS"
test_merge "data/FIXTHIS", :args => "FIXTHIS"
2012-01-27 18:29:02 +00:00
test "data/FIXTHIS" do
# INSERT COMMANDS
hash_tmp
2004-08-19 19:37:07 +00:00
end
EOF
echo "New file is $new_file"