From 21afc7dc291f1cb11feec7a9766bf3542545f581 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 3 Sep 2006 15:49:40 +0000 Subject: uuencode: common implementation for wget and uuencode (closing bug 694) --- testsuite/uuencode.tests | 28 ++++++++++++++++++++++ .../uuencode-sets-standard-input-mode-correctly | 4 ---- 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100755 testsuite/uuencode.tests delete mode 100644 testsuite/uuencode/uuencode-sets-standard-input-mode-correctly (limited to 'testsuite') diff --git a/testsuite/uuencode.tests b/testsuite/uuencode.tests new file mode 100755 index 0000000..cb658db --- /dev/null +++ b/testsuite/uuencode.tests @@ -0,0 +1,28 @@ +#!/bin/sh + +# unit test for uuencode to test functionality. +# Copyright 2006 by Erik Hovland +# Licensed under GPL v2, see file LICENSE for details. + +# AUDIT: Unit tests for uuencode + +. testing.sh + +# testing "test name" "options" "expected result" "file input" "stdin" +# file input will be file called "input" +# test can create a file "actual" instead of writing to stdout + +# Test setup of standard input +saved_umask=$(umask) +umask 0 +testing "uuencode sets standard input mode correctly" \ + "uuencode foo 2!F;W@@:G5M<&5D(&]V97(@=&AE(&QA>GD@8G)O=VX@\n%9&]G+@H\`\n\`\nend\n" \ + "" "The fast grey fox jumped over the lazy brown dog.\n" +testing "uuencode correct base64 encoding" "uuencode -m bb_uuenc_test.out" \ +"begin-base64 644 bb_uuenc_test.out\nVGhlIGZhc3QgZ3JleSBmb3gganVtcGVkIG92ZXIgdGhlIGxhenkgYnJvd24g\nZG9nLgo=\n====\n" \ + "" "The fast grey fox jumped over the lazy brown dog.\n" +exit $FAILCOUNT diff --git a/testsuite/uuencode/uuencode-sets-standard-input-mode-correctly b/testsuite/uuencode/uuencode-sets-standard-input-mode-correctly deleted file mode 100644 index 1a48a66..0000000 --- a/testsuite/uuencode/uuencode-sets-standard-input-mode-correctly +++ /dev/null @@ -1,4 +0,0 @@ -saved_umask=$(umask) -umask 0 -busybox uuencode foo