Path: csiph.com!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Kang-min Liu Newsgroups: tw.bbs.comp.lang.perl Subject: =?utf-8?B?W+i9ieiyvF0=?= Test2::Suite =?utf-8?Q?=E9=80=B2?= perl5.git =?utf-8?Q?=E4=BA=86?= Date: Mon, 25 Sep 2023 23:21:50 +0900 Organization: A noiseless patient Spider Lines: 58 Message-ID: <86cyy6l4e9.fsf@alpiner.steamdeck> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: dont-email.me; posting-host="72a77b6984fc1f50515397b1441657f3"; logging-data="2057827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18N0tgDYVSeqamoku74qb+D" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cancel-Lock: sha1:+h6fznlNRcAMewC91Xv9FPK+l3M= sha1:af9z3iCrcnUPhES15p3VGiJr8o0= Xref: csiph.com tw.bbs.comp.lang.perl:37 這樣看來應該就是會在接下來的 5.40 版正式釋出了吧。 訊息中也提到舊有的 Test::More 已經不適合再更新了。想必是有架構上的難處吧。 我工作方面已經全換成 Test2::Suite 了,倒是幾個開源專案還沒。看來可以立刻 來換一換。 ___ 以下是全文轉貼 ____ Date: Thu, 21 Sep 2023 11:22:36 +0100 To: Perl5 Porters Subject: Perl now includes Test2::Suite From: leonerd@leonerd.org.uk ("Paul \"LeoNerd\" Evans") As of yesterday, bleadperl now ships with the full Test2::Suite distribution, which includes `Test2::V0`. This was merged a little bit after the 5.39.3 release so it'll make its first public outing in 5.39.4. The perldelta says • Test2::Suite 0.000156 has been added to the Perl core. This distribution contains a comprehensive set of test tools for writing unit tests. It is the successor to Test::More and similar modules. Its inclusion in the Perl core means that CPAN module tests can be written using this suite of tools without extra dependencies. • Term::Table 0.017 has been added to the Perl core. This module is a dependency of Test2::Suite. Over the past few months I've already been migrating quite a lot of my CPAN dists into using Test2, and I imagine I'll continue to do so. Test2 has a "migration guide" manual that you might find useful: https://metacpan.org/pod/Test2::Manual::Testing::Migrating Though honestly I find I get my tests about 99% correct already by simply doing: $ find -name \*.t | xargs sed -i 's/use Test::More/use Test2::V0/' $ find -name \*.t | xargs sed -i 's/is_deeply(/is(/' then manually editing any other edge-cases that I find; but that's perhaps easier because my existing test style already mostly matched what Test2 wanted. Anyhow, I suggest going to check it out, because it's verymuch the direction that further development will be happening. The legacy tools of `Test::More` and friends are unfortunately now not suitable for adding any new features or tools to, so I consider them "end-of-life". They'll continue to work, but I wouldn't suggest anyone write any new tests based on them, and instead consider gradually migrating what you have into Test2 instead. --