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
34092dea
Commit
34092dea
authored
May 20, 2016
by
Dylan Hardison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add markdown tests for Bug 1205415
parent
779e021e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
4 deletions
+68
-4
META.json
META.json
+4
-2
META.yml
META.yml
+4
-2
Makefile.PL
Makefile.PL
+1
-0
100markdown.t
t/100markdown.t
+59
-0
No files found.
META.json
View file @
34092dea
...
...
@@ -4,7 +4,7 @@
"Bugzilla Developers <developers@bugzilla.org>"
],
"dynamic_config"
:
1
,
"generated_by"
:
"ExtUtils::MakeMaker version 7.
1, CPAN::Meta::Converter version 2.150001
"
,
"generated_by"
:
"ExtUtils::MakeMaker version 7.
04, CPAN::Meta::Converter version 2.150005
"
,
"license"
:
[
"unknown"
],
...
...
@@ -378,11 +378,13 @@
"requires"
:
{
"Pod::Checker"
:
"0"
,
"Pod::Coverage"
:
"0"
,
"Test2::Suite"
:
"0"
,
"Test::More"
:
"0"
,
"Test::Perl::Critic"
:
"0"
}
}
},
"release_status"
:
"stable"
,
"version"
:
"5.1"
"version"
:
"v5.1.1+"
,
"x_serialization_backend"
:
"JSON::PP version 2.27203"
}
META.yml
View file @
34092dea
...
...
@@ -6,12 +6,13 @@ build_requires:
ExtUtils::MakeMaker
:
'
6.55'
Pod::Checker
:
'
0'
Pod::Coverage
:
'
0'
Test2::Suite
:
'
0'
Test::More
:
'
0'
Test::Perl::Critic
:
'
0'
configure_requires
:
ExtUtils::MakeMaker
:
'
6.55'
dynamic_config
:
1
generated_by
:
'
ExtUtils::MakeMaker
version
7.
1,
CPAN::Meta::Converter
version
2.150001
'
generated_by
:
'
ExtUtils::MakeMaker
version
7.
04,
CPAN::Meta::Converter
version
2.150005
'
license
:
unknown
meta-spec
:
url
:
http://module-build.sourceforge.net/META-spec-v1.4.html
...
...
@@ -186,4 +187,5 @@ requires:
Template
:
'
2.24'
URI
:
'
1.55'
perl
:
'
5.014000'
version
:
'
5.1'
version
:
v5.1.1+
x_serialization_backend
:
'
CPAN::Meta::YAML
version
0.016'
Makefile.PL
View file @
34092dea
...
...
@@ -67,6 +67,7 @@ my %build_requires = (
);
my
%
test_requires
=
(
'Test::More'
=>
0
,
'Test2::Suite'
=>
0
,
'Pod::Checker'
=>
0
,
'Pod::Coverage'
=>
0
,
'Test::Perl::Critic'
=>
0
...
...
t/100markdown.t
0 → 100644
View file @
34092dea
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
# Enforce high standards against code that will be installed
use 5.14.0;
use strict;
use warnings;
use lib qw(. lib local/lib/perl5 t);
use Test2::Bundle::Extended;
use Bugzilla;
use Bugzilla::Bug;
use Bugzilla::Comment;
use Bugzilla::User;
use Bugzilla::Markdown;
my $user_mock = mock 'Bugzilla::User' => (
override_constructor => ['new', 'hash'],
);
my $comment_mock = mock 'Bugzilla::Comment' => (
add_constructor => ['new', 'hash'],
);
my $bug_mock = mock 'Bugzilla::Bug' => (
override_constructor => ['new', 'hash'],
);
# mocked objects just take all constructor args and put them into the hash.
my $user = Bugzilla::User->new(
userid => 33,
settings => { use_markdown => { is_enabled => 1, value => 'on' } },
);
my $bug = Bugzilla::Bug->new(bug_id => 666);
my $comment = Bugzilla::Comment->new(already_wrapped => 0);
Bugzilla->set_user($user);
my $markdown_text = <<MARKDOWN;
```
this is a block
> with an embedded blockquote
```
MARKDOWN
my $markdown = Bugzilla::Markdown->new();
ok($markdown, "got a new markdown object");
my $markdown_html = $markdown->markdown($markdown_text, $bug, $comment);
is("<pre><code>this is a block\n"
. "> with an embedded blockquote</code></pre>\n",
$markdown_html, "code block with embedded block quote");
done_testing;
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