Date: Mon, 18 Jun 2012 01:39:39 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r237861 - soc2012/jhagewood/diff Message-ID: <20120618013939.C8612106566B@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhagewood Date: Mon Jun 18 01:39:38 2012 New Revision: 237861 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=237861 Log: Added: soc2012/jhagewood/diff/diff-test.sh Added: soc2012/jhagewood/diff/diff-test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2012/jhagewood/diff/diff-test.sh Mon Jun 18 01:39:38 2012 (r237861) @@ -0,0 +1,43 @@ +# Script for testing BSD diff outputs against GNU diff outputs. +# Jesse Hagewood +# jhagewood@freebsd.org + +#!/bin/sh + +rm -rf ./test_outputs +mkdir ./test_outputs +mkdir ./test_outputs/gnu +mkdir ./test_outputs/bsd + +# +# Run GNU diff with various options, direct output to a file. +# + +# Default diff +diff 1.txt 2.txt >> ./test_outputs/gnu/diff.txt + +# Unified output +diff -u 1.txt 2.txt >> ./test_outputs/gnu/unified.txt +diff --unified 1.txt 2.txt >> ./test_outputs/gnu/unified.txt + +# Context output +diff -c 1.txt 2.txt >> ./test_outputs/gnu/context.txt +diff --context 1.txt 2.txt >> ./test_outputs/gnu/context.txt + +# +# Run BSD diff with various options, direct output to a file. +# + +# Default diff +./diff 1.txt 2.txt >> ./test_outputs/bsd/diff.txt + +# Unified output +./diff -u 1.txt 2.txt >> ./test_outputs/bsd/unified.txt +./diff --unified 1.txt 2.txt >> ./test_outputs/bsd/unified.txt + +# Context output +./diff -c 1.txt 2.txt >> ./test_outputs/bsd/context.txt +./diff --context 1.txt 2.txt >> ./test_outputs/bsd/context.txt + +diff -rupN ./test_outputs/gnu/ ./test_outputs/bsd/ >> ./test_outputs/gnu-bsd-diff.txt +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120618013939.C8612106566B>