aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/049.sh
blob: 114bdb9a3b7e094b8c283b29e4223908d5f314ab (plain)
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
set -e

cat <<'EOF' > input
foo
bar
baz
EOF
cat <<'EOF' > expected
foo
foo
bar
bar
baz
baz
EOF
bash ../../test_diff.sh hoge piyo fuga<<'EOF'
struct FILE;
typedef struct FILE FILE;
extern FILE* stdin;
extern FILE* stdout;
int fprintf();
char* fgets();
void* calloc();

int main() {
    char* buf = calloc(256, sizeof(char));
    while (fgets(buf, 256, stdin)) {
        fprintf(stdout, "%s%s", buf, buf);
    }
    return 0;
}
EOF