File: simple1.cc

package info (click to toggle)
snapper 0.10.6-1.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,136 kB
  • sloc: cpp: 24,846; ansic: 1,466; sh: 1,410; makefile: 511; python: 127; ruby: 90
file content (39 lines) | stat: -rw-r--r-- 632 bytes parent folder | download | duplicates (7)
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

#include "common.h"

using namespace std;


int
main()
{
    setup();

    run_command("mkdir directory-pre");
    run_command("echo test > file-pre");
    run_command("ln --symbolic test link-pre");

    first_snapshot();

    run_command("rmdir directory-pre");
    run_command("rm file-pre");
    run_command("rm link-pre");

    run_command("mkdir directory-post");
    run_command("echo test > file-post");
    run_command("ln --symbolic test link-post");

    second_snapshot();

    check_undo_statistics(3, 0, 3);

    undo();

    check_undo_errors(0, 0, 0);

    check_first();

    cleanup();

    exit(EXIT_SUCCESS);
}