Skip to content

Commit

Permalink
Item8621: the mapping using _filetypes.txt was wrong
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@6550 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Feb 26, 2010
1 parent b64f428 commit 87b9ab8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions UnitTestContrib/test/unit/Fn_ICON.pm
Expand Up @@ -75,6 +75,11 @@ sub test_ICON {
$this->assert_html_equals( $html.$this->{reliconurl}.'/gif.gif" alt="else.gif" />', $t);
$t = Foswiki::Func::expandCommonVariables('%ICON{"doc"}%');
$this->assert_html_equals( $html.$this->{reliconurl}.'/doc.gif" alt="doc" />', $t);
# SMELL: depends on _filetypes.txt being correct
$t = Foswiki::Func::expandCommonVariables(
'%ICON{"unknown.tgz" default="argh" alt="bunshop"}%');
$this->assert_html_equals(
$html.$this->{reliconurl}.'/zip.gif" alt="bunshop" />', $t);
}

1;
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Macros/ICON.pm
Expand Up @@ -66,7 +66,7 @@ sub _lookupIcon {
if ( defined $icon ) {
# For historical reasons these icons are always .gif files,
# and can be assumed to exist.
$path = $this->{_ICONSPACE}->getPath()."/$ext.gif";
$path = $this->{_ICONSPACE}->getPath()."/$icon.gif";
}
}

Expand Down

0 comments on commit 87b9ab8

Please sign in to comment.