developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 12 years ago

#706 closed bug (fixed)

Unit Tests: char 0 is erased in diff html output

Reported by: Julien Owned by: Julien
Priority: normal Milestone: Jelix 1.0.6
Component: module:junittests Version: 1.0.5
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

While working on #691, I noticed that HTML output for Diff in unit tests stripped char "0".

testcase :

<?php

require_once('jelix/lib/diff/diffhtml.php');

$diff = new Diff(array('<option value="0" >'),array('<option value="0" />'));
$fmt = new HtmlUnifiedDiffFormatter();
echo $fmt->format($diff);

You get :

@@ -1 +1 @@
-<option value="" >
+<option value="" />

instead of

@@ -1 +1 @@
-<option value="0" >
+<option value="0" />

Attachments (1)

706-Unit-Tests-char-0-is-erased-in-diff-html-output.diff (468 bytes) - added by Julien 12 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 12 years ago by Julien

  • Owner set to Julien
  • review set to review?
  • Status changed from new to assigned

Here's the patch. I think it solves the problem.

I'm not sure that the test I modified is necessary, but I kept it for the moment.

comment:2 Changed 12 years ago by laurentj

  • Milestone set to Jelix 1.0.6
  • review changed from review? to review+
  • Version changed from trunk to 1.0.5

Very good :-) You can commit it

comment:3 Changed 12 years ago by Julien

  • Resolution set to fixed
  • Status changed from assigned to closed

committed in the trunk and 1.0.x branch

Note: See TracTickets for help on using tickets.