Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
diffoscope
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reproducible Builds
diffoscope
Commits
62578364
Commit
62578364
authored
8 years ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
tests: Test --text-color output format.
Signed-off-by:
Chris Lamb
<
lamby@debian.org
>
parent
6a47b061
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/data/output.colored.txt
+31
-0
31 additions, 0 deletions
tests/data/output.colored.txt
tests/test_presenters.py
+5
-0
5 additions, 0 deletions
tests/test_presenters.py
with
36 additions
and
0 deletions
tests/data/output.colored.txt
0 → 100644
+
31
−
0
View file @
62578364
--- test1.tar
+++ test2.tar
├── file list
│ [0;36m@@ -1,4 +1,4 @@[0m
│ [31m-drwxr-xr-x 0 lunar (1000) lunar (1000) 0 2015-06-29 15:49:09.000000 dir/[0m
│ [31m--rw-r--r-- 0 lunar (1000) lunar (1000) 446 2015-06-29 15:49:09.000000 dir/text[0m
│ [31m-crw-r--r-- 0 root (0) root (0) 1, 3 2015-06-29 15:49:09.000000 dir/null[0m
│ [31m-lrwxrwxrwx 0 lunar (1000) lunar (1000) 0 2015-06-29 15:49:09.000000 dir/link -> broken[0m
│ [32m+drwxr-xr-x 0 lunar (1000) lunar (1000) 0 2015-06-29 15:49:41.000000 dir/[0m
│ [32m+-rw-r--r-- 0 lunar (1000) lunar (1000) 671 2015-06-29 15:49:41.000000 dir/text[0m
│ [32m+crw-r--r-- 0 root (0) root (0) 1, 3 2015-06-29 15:49:41.000000 dir/null[0m
│ [32m+lrwxrwxrwx 0 lunar (1000) lunar (1000) 0 2015-06-29 15:49:41.000000 dir/link -> really-broken[0m
├── dir/text
│ [0;36m@@ -1,6 +1,12 @@[0m
│ [32m+A common form of lorem ipsum reads:[0m
│ [32m+[0m
│ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
│ incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
│ nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
│ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
│ fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
│ culpa qui officia deserunt mollit anim id est laborum.
│ [32m+[0m
│ [32m+"Lorem ipsum" text is derived from sections 1.10.32--3 of Cicero's De finibus[0m
│ [32m+bonorum et malorum (On the Ends of Goods and Evils, or alternatively [About][0m
│ [32m+The Purposes of Good and Evil).[0m
├── dir/link
│┄ symlink
│ [0;36m@@ -1 +1 @@[0m
│ [31m-destination: broken[0m
│ [32m+destination: really-broken[0m
This diff is collapsed.
Click to expand it.
tests/test_presenters.py
+
5
−
0
View file @
62578364
...
...
@@ -61,6 +61,11 @@ def extract_body(val):
return
result
def
test_text_option_color
(
capsys
):
out
=
run
(
capsys
,
'
--text-color=always
'
)
assert
out
==
data
(
'
output.colored.txt
'
)
def
test_text_option_with_file
(
tmpdir
,
capsys
):
report_path
=
str
(
tmpdir
.
join
(
'
report.txt
'
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment