Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Mynij-unit-tests
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alexandra Rogova
Mynij-unit-tests
Commits
4c991d13
Commit
4c991d13
authored
Apr 28, 2020
by
Alexandra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sitemap test results
parent
b0c24209
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
94 deletions
+14
-94
Milestone2/files/SITEMAP/sitemap_control.xml
Milestone2/files/SITEMAP/sitemap_control.xml
+0
-90
Milestone2/results/sitemap.csv
Milestone2/results/sitemap.csv
+4
-1
Milestone2/run.js
Milestone2/run.js
+10
-3
No files found.
Milestone2/files/SITEMAP/sitemap_control.xml
View file @
4c991d13
This diff is collapsed.
Click to expand it.
Milestone2/results/sitemap.csv
View file @
4c991d13
file name,items,items in index,title found,content complete
./files/SITEMAP/sitemap_control.xml,100,100,true,true
./files/SITEMAP/bad_formatting.xml,bad formatting,1,true,true
./files/SITEMAP/list.xml,11,10,true,true
./files/SITEMAP/sitemap_control.xml,10,10,true,true
./files/SITEMAP/unrecognized.xml,bad formatting,Error : no links found
Milestone2/run.js
View file @
4c991d13
...
...
@@ -49,13 +49,20 @@ function run(script, files, stream, callback){
fs
.
readFile
(
to_run
,
(
err
,
data
)
=>
{
if
(
to_run
.
includes
(
"
rss
"
)
||
to_run
.
includes
(
"
atom
"
)){
rss_parser
.
parseString
(
data
,
(
err
,
result
)
=>
{
if
(
err
)
stream
.
write
(
to_run
+
"
,
"
+
"
bad formatting
"
+
"
,
"
+
mes
);
if
(
err
)
stream
.
write
(
to_run
+
"
,
"
+
"
bad formatting
"
+
"
,
"
+
mes
+
"
\n
"
);
else
stream
.
write
(
to_run
+
"
,
"
+
result
.
items
.
length
+
"
,
"
+
mes
+
"
\n
"
);
});
}
else
{
xml_parser
(
data
,
(
err
,
result
)
=>
{
if
(
err
)
stream
.
write
(
to_run
+
"
,
"
+
"
bad formatting
"
+
"
,
"
+
mes
);
else
stream
.
write
(
to_run
+
"
,
"
+
result
.
urlset
.
url
.
length
.
toString
()
+
"
,
"
+
mes
+
"
\n
"
);
if
(
err
){
var
data_lines
=
data
.
toString
().
split
(
"
\n
"
);
if
(
data_lines
[
0
].
includes
(
"
https://
"
)
||
data_lines
[
0
].
includes
(
"
http://
"
))
stream
.
write
(
to_run
+
"
,
"
+
data_lines
.
length
+
"
,
"
+
mes
+
"
\n
"
)
else
stream
.
write
(
to_run
+
"
,
"
+
"
bad formatting
"
+
"
,
"
+
mes
+
"
\n
"
);
}
else
{
if
(
result
.
urlset
)
stream
.
write
(
to_run
+
"
,
"
+
result
.
urlset
.
url
.
length
.
toString
()
+
"
,
"
+
mes
+
"
\n
"
);
else
stream
.
write
(
to_run
+
"
,
"
+
"
bad formatting
"
+
"
,
"
+
mes
+
"
\n
"
);
}
});
}
});
...
...
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