From owner-svn-soc-all@FreeBSD.ORG Mon Jun 18 02:57:52 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 338E71065670 for ; Mon, 18 Jun 2012 02:57:50 +0000 (UTC) (envelope-from jhagewood@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Mon, 18 Jun 2012 02:57:50 +0000 Date: Mon, 18 Jun 2012 02:57:50 +0000 From: jhagewood@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120618025750.338E71065670@hub.freebsd.org> Cc: Subject: socsvn commit: r237867 - soc2012/jhagewood/diff X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2012 02:57:52 -0000 Author: jhagewood Date: Mon Jun 18 02:57:49 2012 New Revision: 237867 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=237867 Log: Added: soc2012/jhagewood/diff/diff-test.shclear Added: soc2012/jhagewood/diff/diff-test.shclear ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2012/jhagewood/diff/diff-test.shclear Mon Jun 18 02:57:49 2012 (r237867) @@ -0,0 +1,57 @@ +# 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 + +# Normal format output +diff --normal 1.txt 2.txt >> ./test_outputs/gnu/normal.txt +diff -c --normal 1.txt 2.txt >> ./test_outputs/gnu/normal.txt +diff -u --normal 1.txt 2.txt >> ./test_outputs/gnu/normal.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 + +# Normal format output +./diff --normal 1.txt 2.txt >> ./test_outputs/bsd/normal.txt +./diff -c --normal 1.txt 2.txt >> ./test_outputs/bsd/normal.txt +./diff -u --normal 1.txt 2.txt >> ./test_outputs/bsd/normal.txt + +# +# Get the diff between the GNU and BSD outputs. +# + +diff -rupN ./test_outputs/gnu/ ./test_outputs/bsd/ >> ./test_outputs/gnu-bsd-diff.txt +