Next changeset 1:02dfbbf869d8 (2020-04-14) |
Commit message:
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/diff commit 9b11cc5751c0931172d00799b246fcbd63660311" |
added:
diff.xml test-data/file1.txt test-data/file2.txt |
b |
diff -r 000000000000 -r 8a18547725cf diff.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/diff.xml Tue Mar 31 16:36:28 2020 -0400 |
[ |
@@ -0,0 +1,91 @@ +<tool id="diff" name="diff" version="3.6+galaxy0"> + + <description>analyzes two files and generates a text file with information about the lines that are different</description> + + <requirements> + <requirement type="package" version="3.6">diffutils</requirement> + </requirements> + + <stdio> + <exit_code range="2:" level="fatal" description="Something went wrong trying to check differences in files. Please check output log for more details." /> + <regex match="diff: memory exhausted" source="stdout" level="fatal_oom" description="Out of memory error occurred" /> + </stdio> + + <command ><![CDATA[ + diff -u '$input1' '$input2' > '$output1' + ]]> + </command> + + <inputs> + <param name="input1" type="data" format="txt" label="First input file" /> + <param name="input2" type="data" format="txt" label="Second input file" /> + </inputs> + + <outputs> + <data name="output1" format="txt" /> + </outputs> + + <tests> + <test expect_exit_code="0" expect_failure="false"> + <param name="input1" value="file1.txt" /> + <param name="input2" value="file1.txt" /> + <output name="output1"> + <assert_contents> + <has_n_lines n="0" /> + </assert_contents> + </output> + </test> + <test expect_exit_code="1" expect_failure="false"> + <param name="input1" value="file1.txt" /> + <param name="input2" value="file2.txt" /> + <output name="output1"> + <assert_contents> + <has_n_lines n="5" /> + <has_line line=" a" /> + <has_line line="+b" /> + </assert_contents> + </output> + </test> + </tests> + + <help><![CDATA[ +.. class:: infomark + +**Purpose** + +The **diff** utility is a data comparison tool that calculates and displays the differences between two files. + +Unlike edit distance notions used for other purposes, diff is line-oriented rather than character-oriented, but it is like Levenshtein distance in that it tries to determine the smallest set of deletions and insertions to create one file from the other. + +The diff command displays the changes made in a standard format, such that both humans and machines can understand the changes and apply them: given one file and the changes, the other file can be created. + +.. class:: infomark + +**Input** + +Two text files to be checked for differences line by line. + +.. class:: infomark + +**Output** + +A *single text file*, either: + +- containing the lines differences in **unified format** (*unidiff*), + +- or an **empty** file if the two input files are the same. + ]]> + </help> + + <citations> + <citation type="bibtex"> + @misc{gnudiffutils, + author = {The Free Software Foundation (FSF), Inc}, + year = {2017}, + title = {diff (GNU diffutils)}, + publisher = {The Free Software Foundation (FSF), Inc}, + url = {http://www.gnu.org/software/diffutils/}, + } + </citation> + </citations> +</tool> |
b |
diff -r 000000000000 -r 8a18547725cf test-data/file1.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/file1.txt Tue Mar 31 16:36:28 2020 -0400 |
b |
@@ -0,0 +1,1 @@ +a |
b |
diff -r 000000000000 -r 8a18547725cf test-data/file2.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/file2.txt Tue Mar 31 16:36:28 2020 -0400 |
b |
@@ -0,0 +1,2 @@ +a +b |