aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table-test.c
blob: 32d726dd06845a7d2e004372628e0f6676803e8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * Test code for the ETable package
 *
 * Author:
 *   Miguel de Icaza (miguel@gnu.org)
 */
#include <config.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <gnome.h>

int
main (int argc, char *argv [])
{

    if (isatty (0)){
        int fd;
        
        close (0);
        fd = open ("sample.table", O_RDONLY);
        if (fd == -1){
            fprintf (stderr, "Could not find sample.table, try feeding a table on stdin");
            exit (1);
        }
        dup2 (fd, 0);
    }
    
    gnome_init ("TableTest", "TableTest", argc, argv);
    e_cursors_init ();

    table_browser_test ();
    multi_cols_test ();
    check_test ();
    
    gtk_main ();

    e_cursors_shutdown ();
    return 0;
}