Skip to content

Commit

Permalink
As expected, '.php' has been removed from the stop-words, leading to …
Browse files Browse the repository at this point in the history
…the malfunctions.
  • Loading branch information
mark-kubacki committed Oct 25, 2011
1 parent f6fa833 commit 374a842
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test.php
Expand Up @@ -184,6 +184,24 @@ public function testExcludes2() {
$this->assertEquals($expected, $output);
}

public function testExcludes3() {
// 刘晖 has reported issue #4 and sent pages to reproce the issue.
// Let's see what has been configured to reproduce the incorrect output:
$this->ctx->blog_url = 'http://wangma.me';
$this->ctx->cdn_url = ossdl_off_cdn_strategy_for('http://cdn.wangma.me');

$this->ctx->excludes = array('.php'); //<-- this worked fine!
$input = $this->readCompressedSample('wangma.me-before.gz');
$expected = $this->readCompressedSample('wangma.me-after.gz');
$output = $this->ctx->rewrite($input);
$this->assertEquals($expected, $output);

$this->ctx->excludes = array(); //<-- this is what actually has been configured and caused the malfunction
$expected = $this->readCompressedSample('wangma.me-incorrect.gz');
$output = $this->ctx->rewrite($input);
$this->assertEquals($expected, $output);
}

public function testIncludeDirs() {
// this one has root-relative links to "/extscripts/..."
$this->ctx->blog_url = 'http://screenrant.com';
Expand Down
Binary file added test/samples/wangma.me-after.gz
Binary file not shown.
Binary file added test/samples/wangma.me-before.gz
Binary file not shown.
Binary file added test/samples/wangma.me-incorrect.gz
Binary file not shown.

0 comments on commit 374a842

Please sign in to comment.