Changeset - r4:0eae87d3d1de
[Not reviewed]
default
0 0 4
Wolfgang Scherer (ws) - 13 years ago 2012-03-30 16:08:51
wolfgang.scherer@gmx.de
test/send-test-mail.sh: send test mail through vacation.
test/qp-check.php: test quoted printable.
4 files changed with 187 insertions and 0 deletions:
0 comments (0 inline, 0 general)
test/.htaccess
Show inline comments
 
new file 100644
 
order allow,deny
 
Deny from all
 

	
test/00-testmail-vacation
Show inline comments
 
new file 100644
 
From Wolfgang.Scherer@gmx.de  Mon Oct  6 14:00:01 2008
 
Return-Path: <Wolfgang.Scherer@gmx.de>
 
X-Original-To: ws@sheckley.simul.de
 
Delivered-To: ws@sheckley.simul.de
 
Received: from sheckley.simul.de (sheckley.simul.de.local [127.0.0.1])
 
	by sheckley.simul.de (Postfix) with ESMTP id A31A5FDE4CF
 
	for <ws@sheckley.simul.de>; Mon,  6 Oct 2008 14:00:01 +0200 (CEST)
 
X-SP-Original-From:<ws@sheckley.simul.de> SIZE=646
 
Received: by sheckley.simul.de (Postfix, from userid 0)
 
	id 9D65EFDE4D0; Mon,  6 Oct 2008 14:00:01 +0200 (CEST)
 
From: ws@sheckley.simul.de
 
To: ws@sheckley.simul.de
 
Subject: Vacation Test Mail =?utf-8?Q?=C3=A4=C3=B6=C3=BC?=
 
Content-Type: text/plain; charset=ANSI_X3.4-1968
 
Message-Id: <20081006120001.9D65EFDE4D0@sheckley.simul.de>
 
Date: Mon,  6 Oct 2008 14:00:01 +0200 (CEST)
 

	
 
This is a test mail vor vacation(1)
test/qp-check.php
Show inline comments
 
new file 100644
 
<?php // -*- php -*-
 
// Copyright (C) 2012, Wolfgang Scherer, <Wolfgang.Scherer at gmx.de>
 
// Sponsored by WIEDENMANN SEILE GMBH, http://www.wiedenmannseile.de
 
//
 
// This file is part of Wiedenmann Vacation.
 
//
 
// This program is free software; you can redistribute it and/or modify
 
// it under the terms of the GNU General Public License as published
 
// by the Free Software Foundation; either version 3 of the License, or
 
// (at your option) any later version.
 
//
 
// This program is distributed in the hope that it will be useful, but
 
// WITHOUT ANY WARRANTY; without even the implied warranty of
 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
// General Public License for more details.
 
//
 
// You should have received a copy of the GNU General Public License
 
// along with this program. If not, see <http://www.gnu.org/licenses/>,
 
// or write to Wolfgang Scherer, <Wolfgang.Scherer at gmx.de>
 

	
 
// $_REQUEST['_DEBUG_'] = 1;
 
// $_REQUEST['_DEBUG_TEST_'] = 1;
 
require_once(dirname(__FILE__) . '/../lib/util.php');
 

	
 
$msg = get_text('vacation');
 

	
 
echo "--------------------------------------------------\n";
 
$vacationa = vacation_split($msg, False);
 
$subject = $vacationa[0];
 
$headers = $vacationa[1];
 
$body = $vacationa[2];
 

	
 
$msg = vacation_join($subject, $body, $headers);
 
echo $msg."\n";
 

	
 
echo "--------------------------------------------------\n";
 
$vacationa = vacation_split($msg, True);
 
$subject = $vacationa[0];
 
$headers = $vacationa[1];
 
$body = $vacationa[2];
 

	
 
$msg = vacation_join($subject, $body);
 
echo $msg."\n";
 

	
 
echo "--------------------------------------------------\n";
 
$vacationa = vacation_split($msg, True);
 
$subject = $vacationa[0];
 
$headers = $vacationa[1];
 
$body = $vacationa[2];
 

	
 
$msg = vacation_join($subject . 'äöü', $body);
 
echo $msg."\n";
 

	
 
echo "--------------------------------------------------\n";
 
$vacationa = vacation_split($msg, True);
 
$subject = $vacationa[0];
 
$headers = $vacationa[1];
 
$body = $vacationa[2];
 

	
 
echo 'Subject: '.$subject."\n";
 
echo 'Headers: '. $headers."\n";
 
echo 'Body: '.$body."\n";
 

	
 
echo "--------------------------------------------------\n";
 
$msg = vacation_join($subject, $body);
 
echo $msg."\n";
 

	
 
//
 
// :ide-menu: Emacs IDE Menu - Buffer @BUFFER@
 
// . M-x `eIDE-menu' ()(eIDE-menu "z")
 
// :ide: COMPILE: PHP _DEBUG_=2 _DEBUG_TEST_=2
 
// . (compile (concat "php " (file-name-nondirectory (buffer-file-name)) " _DEBUG_=2 _DEBUG_TEST_=2"))
 

	
 
// :ide: QUO: $this->
 
// . (insert "$this->" )
 

	
 
// :ide: COMPILE: PHP w/o args
 
// . (compile (concat "php " (file-name-nondirectory (buffer-file-name)) ""))
 

	
 
// :ide: COMPILE: PHP _DEBUG_=1 _DEBUG_TEST_=1
 
// . (compile (concat "php " (file-name-nondirectory (buffer-file-name)) " _DEBUG_=1 _DEBUG_TEST_=1"))
 

	
 
//
 
// Local Variables:
 
// mode: php
 
// End:
 
?>
test/send-test-mail.sh
Show inline comments
 
new file 100755
 
#!/bin/sh
 

	
 
# send-test-mail.sh - pipe 00-testmail through vacation(1) for user ws
 

	
 
# usage: send-test-mail.sh [user]
 

	
 
# Copyright (C) 2012, Wolfgang Scherer, <Wolfgang.Scherer at gmx.de>
 
# Sponsored by WIEDENMANN SEILE GMBH, http://www.wiedenmannseile.de
 
#
 
# This file is part of Wiedenmann Vacation.
 
#
 
:  # script help
 
# This program is free software; you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation; either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful, but
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
# General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program. If not, see <http://www.gnu.org/licenses/>,
 
# or write to Wolfgang Scherer, <Wolfgang.Scherer at gmx.de>
 

	
 
# --------------------------------------------------
 
# |||:sec:||| FUNCTIONS
 
# --------------------------------------------------
 

	
 
usage ()
 
{
 
    script_help="script-help"
 
    ( "${script_help}" ${1+"$@"} "${0}" ) 2>/dev/null \
 
    || ${SED__PROG-sed} -n '3,/^[^#]/{;/^[^#]/d;p;}' "${0}";
 
}
 

	
 
test x"${1+set}" = xset && \
 
case "${1}" in
 
-\?|-h|--help) usage; exit 0;;
 
--docu) usage --full; exit 0;;
 
esac
 

	
 
# --------------------------------------------------
 
# |||:sec:||| MAIN
 
# --------------------------------------------------
 

	
 
# |:here:|
 

	
 
USER="${1-ws}"
 

	
 
cat 00-testmail-vacation | formail | vacation "${USER}"
 

	
 
exit # |||:here:|||
 

	
 
#
 
# :ide-menu: Emacs IDE Main Menu - Buffer @BUFFER@
 
# . M-x `eIDE-menu' (eIDE-menu "z")
 

	
 
# :ide: SNIP: insert OPTION LOOP
 
# . (snip-insert-mode "sh_b.opt-loop" nil t)
 

	
 
# :ide: SHELL: Run with --docu
 
# . (progn (save-buffer) (shell-command (concat "sh " (file-name-nondirectory (buffer-file-name)) " --docu")))
 

	
 
# :ide: SHELL: Run with --help
 
# . (progn (save-buffer) (shell-command (concat "sh " (file-name-nondirectory (buffer-file-name)) " --help")))
 

	
 
# :ide: SHELL: Run w/o args
 
# . (progn (save-buffer) (shell-command (concat "sh " (file-name-nondirectory (buffer-file-name)) " ")))
 

	
 
#
 
# Local Variables:
 
# mode: sh
 
# comment-start: "#"
 
# comment-start-skip: "#+"
 
# comment-column: 0
 
# End:
 
# mmm-classes: (here-doc ide-entries)
0 comments (0 inline, 0 general)