~ubuntu-branches/ubuntu/vivid/cctools/vivid

« back to all changes in this revision

Viewing changes to dttools/src/chunk_test.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2011-05-07 09:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20110507090500-lqpmdtwndor6e7os
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
 
3
Copyright (C) 2005- The University of Notre Dame
 
4
This software is distributed under the GNU General Public License.
 
5
See the file COPYING for details.
 
6
*/
 
7
 
 
8
#include <stdio.h>
 
9
#include <stdlib.h>
 
10
#include <string.h>
 
11
 
 
12
#include "chunk.h"
 
13
 
 
14
int main(int argc, char **argv)
 
15
{
 
16
        char **files = malloc(2 * sizeof(*files));
 
17
 
 
18
        files[0] = malloc(8 * sizeof(*files[0]));
 
19
        strcpy(files[0], "chunk.c");
 
20
 
 
21
        files[1] = malloc(8 * sizeof(*files[0]));
 
22
        strcpy(files[1], "chunk.h");
 
23
 
 
24
        if (!chunk_concat("large_chunk.txt", (char **)files, 2, "> ", NULL))
 
25
        {
 
26
                fprintf(stderr, "chunk_test: chunk_concat failed\n");
 
27
                exit(1);
 
28
        }
 
29
        
 
30
        return 0;
 
31
}