From 5d3a0ab2bee3d41e1c380d2118ef61c5f190c4e8 Mon Sep 17 00:00:00 2001 From: PaulHarvey Date: Mon, 30 Jan 2012 11:25:01 +0000 Subject: [PATCH] Item11440: add dummy test, avoid silently skipping Previously, the default UnitTestContrib config results in zero tests being generated, so a dummy test means there's always at least one test and the skip annotation can then inform the user why no tests were generated in the output summary. Without this we get silent skippage, and that's not good. git-svn-id: http://svn.foswiki.org/trunk@13869 0b4bb1d4-4e5a-0410-9cc4-b2b747904278 --- .../unit/WysiwygPlugin/BrowserTranslatorTests.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/WysiwygPlugin/test/unit/WysiwygPlugin/BrowserTranslatorTests.pm b/WysiwygPlugin/test/unit/WysiwygPlugin/BrowserTranslatorTests.pm index f2364c1a27..40dd04cad0 100644 --- a/WysiwygPlugin/test/unit/WysiwygPlugin/BrowserTranslatorTests.pm +++ b/WysiwygPlugin/test/unit/WysiwygPlugin/BrowserTranslatorTests.pm @@ -632,6 +632,18 @@ sub compareHTML_TML { $this->assert_tml_equals( $args->{tml}, $actualTml, $args->{name} ); } +# Item11440 - dummy test, do not remove. skip() is never called if list_tests() +# returns nothing (why bother skipping zero tests), and this is the case with +# the (default) empty $Foswiki::cfg{UnitTestContrib}{SeleniumRc}{Browsers} +# +# We would rather a bogus dummy test which gives a meaningful skip annotation +# in the result summary, than to silently skip a suite which contains zero tests +sub test_nothing { + my ($this) = @_; + + return; +} + 1; __END__