Tore Morkemo reported that two files which print the same, one in
ISO-8859-1 and one in UTF-8, would not be detected by the "diff"
utility procedure. Here's the obvious fix.
--
Daniel Jacobowitz
CodeSourcery
2008-04-06 Daniel Jacobowitz <[EMAIL PROTECTED]>
* lib/utils.exp (diff): Open both files as binary.
---
lib/utils.exp | 2 ++
1 file changed, 2 insertions(+)
Index: dejagnu-1.4.4.cvs20060709/lib/utils.exp
===================================================================
--- dejagnu-1.4.4.cvs20060709.orig/lib/utils.exp 2007-04-01
18:19:23.000000000 -0400
+++ dejagnu-1.4.4.cvs20060709/lib/utils.exp 2007-04-01 18:19:48.000000000
-0400
@@ -320,6 +320,7 @@ proc diff { file_1 file_2 } {
if {[file exists ${file_1}]} {
set file_a [open ${file_1} r]
+ fconfigure $file_a -encoding binary
} else {
warning "${file_1} doesn't exist"
return 0
@@ -327,6 +328,7 @@ proc diff { file_1 file_2 } {
if {[file exists ${file_2}]} {
set file_b [open ${file_2} r]
+ fconfigure $file_b -encoding binary
} else {
warning "${file_2} doesn't exist"
return 0
_______________________________________________
DejaGnu mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/dejagnu