summaryrefslogtreecommitdiff
path: root/29_outname/outname_test.c
blob: 6a9493abd20333a55e1d27b81c6669204b5e5317 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "outname.h"
#include <stdio.h>
#include <stdlib.h>


#define NUM_TESTS 3
int main(void) {
  char * testNames[NUM_TESTS] = {"input.txt",
                                 "anotherTestFileName.txt",
                                 "somethingelse"};
  
  for (int i = 0; i < NUM_TESTS; i++) {
    char * outName = computeOutputFileName(testNames[i]);
    printf("'%s' => '%s'\n", testNames[i], outName);
    free(outName);
  }
  return EXIT_SUCCESS;
}