Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
e43d323b
Commit
e43d323b
authored
Mar 01, 2009
by
wurblzap%gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 295205 - runtests.pl should check that the line endings of files conform to your OS standard.
Patch by Marc Schumann <wurblzap@gmail.com>. r=LpSolit,mkanat; a=mkanat.
parent
e417256b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
005whitespace.t
t/005whitespace.t
+18
-2
No files found.
t/005whitespace.t
View file @
e43d323b
...
...
@@ -19,6 +19,8 @@
#
# Contributor(s): Jacob Steenhagen <jake@bugzilla.org>
# David D. Kilzer <ddkilzer@kilzer.net>
# Colin Ogilvie <mozilla@colinogilvie.co.uk>
# Marc Schumann <wurblzap@gmail.com>
#
#################
...
...
@@ -34,7 +36,7 @@ use Support::Templates;
use
File::
Spec
;
use
Test::
More
tests
=>
(
scalar
(
@
Support::Files::
testitems
)
+
$
Support::Templates::
num_actual_files
);
+
$
Support::Templates::
num_actual_files
)
*
2
;
my
@testitems
=
@
Support::Files::
testitems
;
for
my
$path
(
@
Support::Templates::
include_paths
)
{
...
...
@@ -42,9 +44,12 @@ for my $path (@Support::Templates::include_paths) {
Support::Templates::
find_actual_files
(
$path
)));
}
my
%
results
;
foreach
my
$file
(
@testitems
)
{
open
(
FILE
,
"$file"
);
if
(
grep
/\t/
,
<
FILE
>
)
{
my
@contents
=
<
FILE
>
;
if
(
grep
/\t/
,
@contents
)
{
ok
(
0
,
"$file contains tabs --WARNING"
);
}
else
{
ok
(
1
,
"$file has no tabs"
);
...
...
@@ -52,4 +57,15 @@ foreach my $file (@testitems) {
close
(
FILE
);
}
foreach
my
$file
(
@testitems
)
{
open
(
FILE
,
"$file"
);
my
@contents
=
<
FILE
>
;
if
(
grep
/\r/
,
@contents
)
{
ok
(
0
,
"$file contains non-OS-conformant line endings --WARNING"
);
}
else
{
ok
(
1
,
"All line endings of $file are OS conformant"
);
}
close
(
FILE
);
}
exit
0
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment