コマンドを使用して、いくつかのパラメーターをテスト スクリプトに渡そうとしていますprove
。オプションがハッシュ化されたいくつかの古いスレッドと、man
オプションの前に :: を使用する私の証明のページ (以下に引用) の内容に基づいて、証明はまだテストスクリプトのオプションを独自のものとして解析しています:
$
prove -v t/040-unit-object-test.t :: --unit 270149
Unknown option: unit
マニュアルページの関連部分は次のとおりです。
Arguments to Tests It is possible to supply arguments to tests. To do so separate them from prove's own arguments with the arisdottle, '::'. For example prove -v t/mytest.t :: --url http://example.com would run t/mytest.t with the options '--url http://example.com'. When running multiple tests they will each receive the same arguments.
sudo
オプションをルートとして実行しようとしましたが、同じエラーが発生しました。
Getopt::Long モジュールを使用してオプションを取得しています。プレーンな old を使用してテスト スクリプトを実行すると、オプションが機能しますperl
が、SKIP および TODO ブロックが機能しません。
回避策を使用する必要はありません--exec
。
Mac OS 10.6 で Perl 5.10 を実行しています。
の出力prove -V
は次のとおりです。
prove v2.64, using Test::Harness v3.25 and Perl v5.10.0