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
6b4ffb0c
Commit
6b4ffb0c
authored
Nov 11, 2002
by
zach%zachlipton.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug 179396 (add 007util.t in order to test Bugzilla::Util).
rx2=bbaetz, a=myk (on the condition that we check out the use of the trilicense later)
parent
97933de1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
0 deletions
+71
-0
007util.t
t/007util.t
+71
-0
No files found.
t/007util.t
0 → 100644
View file @
6b4ffb0c
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code are the Bugzilla Tests.
#
# The Initial Developer of the Original Code is Zach Lipton
# Portions created by Zach Lipton are
# Copyright (C) 2002 Zach Lipton. All
# Rights Reserved.
#
# Contributor(s): Zach Lipton <zach@zachlipton.com>
#
# Alternatively, the contents of this file may be used under the
# terms of the GNU General Public License Version 2 or later (the
# "GPL"), in which case the provisions of the GPL are applicable
# instead of those above. If you wish to allow use of your
# version of this file only under the terms of the GPL and not to
# allow others to use your version of this file under the MPL,
# indicate your decision by deleting the provisions above and
# replace them with the notice and other provisions required by
# the GPL. If you do not delete the provisions above, a recipient
# may use your version of this file under either the MPL or the
# GPL.
#
#################
#Bugzilla Test 7#
#####Util.pm#####
use
lib
't'
;
use
Support::
Files
;
BEGIN
{
use
Test::
More
tests
=>
10
;
use_ok
(
Bugzilla::
Util
);
}
# we don't test the taint functions since that's going to take some more work.
# XXX: test taint functions
#html_quote():
is
(
html_quote
(
"<lala&>"
),
"<lala&>"
,
'html_quote'
);
#url_quote():
is
(
url_quote
(
"<lala&>gaa\"'[]{\\"
),
"%3Clala%26%3Egaa%22%27%5B%5D%7B%5C"
,
'url_quote'
);
#value_quote():
is
(
value_quote
(
"<lal\na&>g\naa\"'[\n]{\\"
),
"<lal
a&>g
aa"'[
]{\\"
,
'value_quote'
);
#lsearch():
my
@list
=
(
'apple'
,
'pear'
,
'plum'
,
'<"\\%'
);
is
(
lsearch
(
\
@list
,
'pear'
),
1
,
'lsearch 1'
);
is
(
lsearch
(
\
@list
,
'<"\\%'
),
3
,
'lsearch 2'
);
is
(
lsearch
(
\
@list
,
'kiwi'
),
-
1
,
'lsearch 3 (missing item)'
);
#max() and min():
my
@list
=
(
7
,
27
,
636
,
2
);
is
(
max
(
@list
),
636
,
'max()'
);
is
(
min
(
@list
),
2
,
'min()'
);
#trim():
is
(
trim
(
" fg<*\$%>+=~~ "
),
'fg<*$%>+=~~'
,
'trim()'
);
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