Item1179: UnitTests: Subroutine test_htpasswd_md5 redefined

pencil
Priority: Normal
Current State: Closed
Released In: 1.0.4
Target Release: patch
Applies To: Engine
Component: UnitTestContrib
Branches:
Reported By: OlivierRaginel
Waiting For:
Last Change By: KennethLavrsen
When running the unit tests, you encounter this message which isn't in fact reported as an error:
Subroutine test_htpasswd_md5 redefined at
    /home/babar/work/wiki/core/test/unit/PasswordTests.pm line 208 (#1)
    (W redefine) You redefined a subroutine.  To suppress this warning, say

        {
        no warnings 'redefine';
        eval "sub name { ... }";
        }

This is due to the fact that there are 2 subs called test_htpasswd_md5 in UnitTestContrib/test/unit/PasswordTests.pm.

As they're very similar, it's just an error. One used to be TODO, and got implemented by someone else, when the first one finally implemented it, he didn't realize it was already done.

Removing the duplicate.

-- OlivierRaginel - 02 Mar 2009

In fact, this brings us back to the (tm)wiki days. If you check their sources, you'll see what I mean. Somebody copied the test_htpasswd_sha1 to detest_htpasswd_md5 and detest_htpasswd_plain, while there was already a TODO_test_htpasswd_md5 and a TODO_test_htpasswd_plain

Removing also the duplicate for _plain to avoid clash when someone implements this.

-- OlivierRaginel - 02 Mar 2009

Also fatwilly'd.

-- OlivierRaginel - 02 Mar 2009

ItemTemplate edit

Summary UnitTests: Subroutine test_htpasswd_md5 redefined
ReportedBy OlivierRaginel
Codebase
SVN Range SVN 2811: Foswiki-1.0.3, Sat, 28 Feb 2009, build 2783
AppliesTo Engine
Component UnitTestContrib
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:db97cd42f866 distro:3abdd379a18e distro:ed46de1c1345 distro:1ee209a8a219
TargetRelease patch
ReleasedIn 1.0.4
Topic revision: r12 - 03 Mar 2009, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy