Programa para el testeo de algunas funciones de la biblioteca <pds/pdscstring.h> .
- Autor
- Fernando Pujaico Rivera
- Copyright
- GNU Public License.
Este programa crea una célula llamada CellString1, le agrega datos, luego los salva en un archivo, finalmente lee los datos del archivo y crea un nueva célula llamada CellString2.
# Compilation command
gcc -o testpdscstring testpdscstring.c -lpdsdatafunc
# Test command
./testpdscstring
#include <stdio.h>
#include <stdlib.h>
#include <pds/pdsdatafunc.h>
int main(int argc, char* argv[])
{
char *string=NULL;
char FILENAME_OUTPUT[]="testpdscstring.out.dat";
if(CellString1==NULL) return EXIT_FAILURE;
printf("\n<<<< CellString1 >>>>\n");
printf("\n<<<< CellString -> string >>>>\n%s\n",string);
if(CellString2==NULL) return EXIT_FAILURE;
printf("\n<<<< CellString2 >>>>\n");
remove(FILENAME_OUTPUT);
return EXIT_SUCCESS;
}