socsvn commit: r237861 - soc2012/jhagewood/diff

jhagewood at FreeBSD.org jhagewood at FreeBSD.org
Mon Jun 18 01:39:42 UTC 2012


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 at 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
+


More information about the svn-soc-all mailing list