From owner-svn-soc-all@FreeBSD.ORG Mon Jun 18 01:39:41 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 C8612106566B for ; Mon, 18 Jun 2012 01:39:39 +0000 (UTC) (envelope-from jhagewood@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Mon, 18 Jun 2012 01:39:39 +0000 Date: Mon, 18 Jun 2012 01:39:39 +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: <20120618013939.C8612106566B@hub.freebsd.org> Cc: Subject: socsvn commit: r237861 - 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 01:39:42 -0000 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 +