Commit 35c35367a043f17d4edb8dcc5561c92df694a00b
1 parent
9c999279
Exists in
master
and in
5 other branches
Iniciando implementacao de uma suite de testes para a biblioteca
Showing
3 changed files
with
181 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,63 @@ |
| 1 | +# | |
| 2 | +# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | |
| 3 | +# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | |
| 4 | +# aplicativos mainframe. Registro no INPI sob o nome G3270. | |
| 5 | +# | |
| 6 | +# Copyright (C) <2008> <Banco do Brasil S.A.> | |
| 7 | +# | |
| 8 | +# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | |
| 9 | +# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | |
| 10 | +# Free Software Foundation. | |
| 11 | +# | |
| 12 | +# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | |
| 13 | +# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | |
| 14 | +# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | |
| 15 | +# obter mais detalhes. | |
| 16 | +# | |
| 17 | +# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | |
| 18 | +# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple | |
| 19 | +# Place, Suite 330, Boston, MA, 02111-1307, USA | |
| 20 | +# | |
| 21 | +# Contatos: | |
| 22 | +# | |
| 23 | +# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
| 24 | +# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) | |
| 25 | +# licinio@bb.com.br (Licínio Luis Branco) | |
| 26 | +# kraucer@bb.com.br (Kraucer Fernandes Mazuco) | |
| 27 | +# | |
| 28 | + | |
| 29 | +include ../include/rules.mak | |
| 30 | +include ../lib3270/sources.mak | |
| 31 | + | |
| 32 | +DEBUG_CFLAGS=-DDEBUG=1 -g -Wall | |
| 33 | +LIBS=-lm -lssl -lcrypto | |
| 34 | + | |
| 35 | +#---[ Rules ]------------------------------------------------------------------ | |
| 36 | + | |
| 37 | +$(OBJDBG)/%.o: %.c | |
| 38 | + @echo " CC `basename $@`" | |
| 39 | + @$(MKDIR) `dirname $@` | |
| 40 | + @$(CC) $(DEBUG_CFLAGS) $(CFLAGS) $(SSL_CFLAGS) -I../include -I../lib3270 -o $@ -c $< | |
| 41 | + | |
| 42 | + | |
| 43 | +$(OBJDBG)/%.o: ../lib3270/%.c | |
| 44 | + @echo " CC `basename $@`" | |
| 45 | + @$(MKDIR) `dirname $@` | |
| 46 | + @$(CC) $(DEBUG_CFLAGS) $(CFLAGS) $(SSL_CFLAGS) -I../include -I../lib3270 -o $@ -c $< | |
| 47 | + | |
| 48 | +#---[ Tags ]------------------------------------------------------------------- | |
| 49 | + | |
| 50 | +Debug: $(BINDBG)/rpqtest$(EXEEXT) | |
| 51 | + | |
| 52 | +$(BINDBG)/rpqtest$(EXEEXT): $(OBJDBG)/rpqtest$(OBJEXT) $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC)$(OBJEXT)) | |
| 53 | + @echo " CCLD `basename $@`" | |
| 54 | + @$(MKDIR) `dirname $@` | |
| 55 | + @$(LD) -o $@ $(OBJDBG)/rpqtest$(OBJEXT) $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC)$(OBJEXT)) $(LIBS) | |
| 56 | + | |
| 57 | +cleanDebug: | |
| 58 | + @rm -fr $(OBJDBG) | |
| 59 | + @rm -fr $(BINDBG) | |
| 60 | + | |
| 61 | +clean: | |
| 62 | + @rm -fr $(OBJDBG) | |
| 63 | + @rm -fr $(BINDBG) | ... | ... |
| ... | ... | @@ -0,0 +1,58 @@ |
| 1 | +/* | |
| 2 | + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | |
| 3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | |
| 4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270. | |
| 5 | + * | |
| 6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | |
| 7 | + * | |
| 8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | |
| 9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | |
| 10 | + * Free Software Foundation. | |
| 11 | + * | |
| 12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | |
| 13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | |
| 14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | |
| 15 | + * obter mais detalhes. | |
| 16 | + * | |
| 17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | |
| 18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | |
| 19 | + * St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 20 | + * | |
| 21 | + * Este programa está nomeado como rpqtest.c e possui - linhas de código. | |
| 22 | + * | |
| 23 | + * Contatos: | |
| 24 | + * | |
| 25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
| 26 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | |
| 27 | + * | |
| 28 | + */ | |
| 29 | + | |
| 30 | + | |
| 31 | +#include <stdio.h> | |
| 32 | +#include <string.h> | |
| 33 | + | |
| 34 | +#include <stdio.h> | |
| 35 | +#include <string.h> | |
| 36 | +#include <pthread.h> | |
| 37 | +#include <3270ds.h> | |
| 38 | + | |
| 39 | +#include "globals.h" | |
| 40 | +#include <sf.h> | |
| 41 | +#include <ctlrc.h> | |
| 42 | + | |
| 43 | +static int dump_buffer(H3270 *hSession, unsigned const char *buf, int len) | |
| 44 | +{ | |
| 45 | + return 0; | |
| 46 | +} | |
| 47 | + | |
| 48 | +int main(int numpar, char *param[]) | |
| 49 | +{ | |
| 50 | + H3270 *hSession = lib3270_session_new(""); | |
| 51 | + hSession->write = dump_buffer; | |
| 52 | + | |
| 53 | + lib3270_set_toggle(hSession,LIB3270_TOGGLE_DS_TRACE,1); | |
| 54 | + | |
| 55 | + | |
| 56 | + lib3270_session_free(hSession); | |
| 57 | + return 0; | |
| 58 | +} | ... | ... |
| ... | ... | @@ -0,0 +1,60 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> | |
| 2 | +<CodeBlocks_project_file> | |
| 3 | + <FileVersion major="1" minor="6" /> | |
| 4 | + <Project> | |
| 5 | + <Option title="pw3270tests" /> | |
| 6 | + <Option makefile_is_custom="1" /> | |
| 7 | + <Option pch_mode="2" /> | |
| 8 | + <Option compiler="gcc" /> | |
| 9 | + <Build> | |
| 10 | + <Target title="Debug"> | |
| 11 | + <Option output=".bin/Debug/rpqtest" prefix_auto="1" extension_auto="1" /> | |
| 12 | + <Option object_output=".obj/Debug/" /> | |
| 13 | + <Option type="1" /> | |
| 14 | + <Option compiler="gcc" /> | |
| 15 | + <Compiler> | |
| 16 | + <Add option="-g" /> | |
| 17 | + </Compiler> | |
| 18 | + </Target> | |
| 19 | + <Target title="Release"> | |
| 20 | + <Option output=".bin/Release/pw3270tests" prefix_auto="1" extension_auto="1" /> | |
| 21 | + <Option object_output=".obj/Release/" /> | |
| 22 | + <Option type="1" /> | |
| 23 | + <Option compiler="gcc" /> | |
| 24 | + <Compiler> | |
| 25 | + <Add option="-O2" /> | |
| 26 | + </Compiler> | |
| 27 | + <Linker> | |
| 28 | + <Add option="-s" /> | |
| 29 | + </Linker> | |
| 30 | + </Target> | |
| 31 | + </Build> | |
| 32 | + <Compiler> | |
| 33 | + <Add option="-Wall" /> | |
| 34 | + </Compiler> | |
| 35 | + <Unit filename="../include/lib3270/session.h" /> | |
| 36 | + <Unit filename="../lib3270/ctlr.c"> | |
| 37 | + <Option compilerVar="CC" /> | |
| 38 | + </Unit> | |
| 39 | + <Unit filename="../lib3270/rpq.c"> | |
| 40 | + <Option compilerVar="CC" /> | |
| 41 | + </Unit> | |
| 42 | + <Unit filename="../lib3270/session.c"> | |
| 43 | + <Option compilerVar="CC" /> | |
| 44 | + </Unit> | |
| 45 | + <Unit filename="../lib3270/sf.c"> | |
| 46 | + <Option compilerVar="CC" /> | |
| 47 | + </Unit> | |
| 48 | + <Unit filename="../lib3270/toggles.c"> | |
| 49 | + <Option compilerVar="CC" /> | |
| 50 | + </Unit> | |
| 51 | + <Unit filename="Makefile" /> | |
| 52 | + <Unit filename="rpqtest.c"> | |
| 53 | + <Option compilerVar="CC" /> | |
| 54 | + </Unit> | |
| 55 | + <Extensions> | |
| 56 | + <code_completion /> | |
| 57 | + <debugger /> | |
| 58 | + </Extensions> | |
| 59 | + </Project> | |
| 60 | +</CodeBlocks_project_file> | ... | ... |