NAME=to
FILE==
CMDS=to bins/headers/s1.h;t S1
EXPECT=<<EOF
pf "ddd x y z"
EOF
RUN

NAME=to
FILE==
CMDS=to bins/headers/s2.h; t S1
EXPECT=<<EOF
pf "ddd x test z"
EOF
RUN

NAME=to same struct redefinition
FILE==
CMDS=<<EOF
to bins/headers/s1.h
to bins/headers/s2.h
t S1
t- S1
to bins/headers/s2.h
t S1
t- S1
EOF
EXPECT=<<EOF
pf "ddd x y z"
pf "ddd x test z"
EOF
RUN

NAME=to perturbated
FILE==
CMDS=<<EOF
to bins/headers/s1.h
to bins/headers/s4.h
t S1
t Perturbator
t- S1
to bins/headers/s4.h
t S1
t Perturbator
EOF
EXPECT=<<EOF
pf "ddd x y z"
pf "d a"
pf "ddd x test z"
pf "d a"
EOF
RUN

NAME=to arrays
FILE==
CMDS=<<EOF
to bins/headers/s3.h
t S1
tsc S1
EOF
EXPECT=<<EOF
pf "[3]d[4]dd x y z"
struct S1 {
	int x[3];
	int y[4];
	int z;
};
EOF
RUN

NAME=to typedefs
FILE==
CMDS=<<EOF
to bins/headers/t1.h
tt easy_prey
ttc easy_prey
tt humans
ttc humans
tt days
ttc days
tt tokyo
ttc tokyo
tsc dangerous
EOF
EXPECT=<<EOF
easy_prey = uint32_t
typedef uint32_t easy_prey;
humans = easy_prey
typedef easy_prey humans;
days = struct dangerous
typedef struct dangerous days;
tokyo = struct dangerous
typedef struct dangerous tokyo;
struct dangerous {
	uint64_t neo;
};
EOF
RUN
