Skip to content

Commit cd111cd

Browse files
committed
[server][tests] Convert some tests from cli to server
1 parent 83a9533 commit cd111cd

39 files changed

Lines changed: 329 additions & 102 deletions

File tree

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
include ../Makefile.cli
2-
3-
4-
ARGUMENTS = -xrefactory-II -refactory -rfct-extract-function -olmark=50 -olcursor=80 $(CURDIR)/source.c
1+
include ../Makefile.server
52

63
$(TEST):
7-
$(COMMAND) -log=log $(EXTRA) > output.tmp
4+
@-$(SERVER_DRIVER) commands.input $(EXTRA) > output.tmp
85
@$(NORMALIZE) output.tmp > output
9-
@$(VERIFY)
6+
$(VERIFY)
107

11-
trace: EXTRA=-debug
8+
trace: EXTRA = --extra '-debug -log=trace'
129
trace: $(TEST)
10+
11+
GDB_COMMANDS =
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CXREF -xrefactory-II -server
2+
-olcxgetprojectname CURDIR/source.c
3+
<sync>
4+
-rfct-extract-function -olmark=50 -olcursor=80 CURDIR/source.c -p CURDIR
5+
<sync>
6+
<exit>

tests/test_extract_out_argument/expected

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
CXREF -xrefactory-II -server -o server-buffer
2+
-olcxgetprojectname CURDIR/source.c
3+
end-of-options
4+
5+
<sync>
6+
<set-info len=<n>>CURDIR</set-info>
7+
-rfct-extract-function -olmark=50 -olcursor=80 CURDIR/source.c -p CURDIR
8+
end-of-options
9+
10+
<sync>
111
<extraction-dialog type=newFunction_> <str len=<n>> newFunction_(&a, &b);
212
</str>
313
<str len=<n>>static void newFunction_(int *_a, int *_b) {
@@ -10,4 +20,6 @@
1020
</str>
1121
<int val=1 len=<n>></int>
1222
</extraction-dialog>
13-
<sync>
23+
-exit
24+
end-of-options
25+
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
include ../Makefile.cli
2-
3-
4-
ARGUMENTS = -xrefactory-II -refactory -rfct-extract-function -olmark=93 -olcursor=114 $(CURDIR)/source.c
1+
include ../Makefile.server
52

63
$(TEST):
7-
$(COMMAND) -log=log $(EXTRA) > output.tmp
4+
@-$(SERVER_DRIVER) commands.input $(EXTRA) > output.tmp
85
@$(NORMALIZE) output.tmp > output
9-
@$(VERIFY)
6+
$(VERIFY)
107

11-
trace: EXTRA=-debug
8+
trace: EXTRA = --extra '-debug -log=trace'
129
trace: $(TEST)
10+
11+
GDB_COMMANDS =
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CXREF -xrefactory-II -server
2+
-olcxgetprojectname CURDIR/source.c
3+
<sync>
4+
-rfct-extract-function -olmark=93 -olcursor=114 CURDIR/source.c -p CURDIR
5+
<sync>
6+
<exit>

tests/test_extract_struct_by_value/expected

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
CXREF -xrefactory-II -server -o server-buffer
2+
-olcxgetprojectname CURDIR/source.c
3+
end-of-options
4+
5+
<sync>
6+
<set-info len=<n>>CURDIR</set-info>
7+
-rfct-extract-function -olmark=93 -olcursor=114 CURDIR/source.c -p CURDIR
8+
end-of-options
9+
10+
<sync>
111
<extraction-dialog type=newFunction_> <str len=<n>> sum = newFunction_(p);
212
</str>
313
<str len=<n>>static int newFunction_(struct Point p) {
@@ -10,4 +20,6 @@
1020
</str>
1121
<int val=2 len=<n>></int>
1222
</extraction-dialog>
13-
<sync>
23+
-exit
24+
end-of-options
25+
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
include ../Makefile.cli
1+
include ../Makefile.server
22

3-
ARGUMENTS = -xrefactory-II -refactory -rfct-extract-variable -olmark=49 -olcursor=44 source.c
4-
5-
$(TEST): .c-xrefrc
6-
$(COMMAND) > output.tmp
3+
$(TEST):
4+
@-$(SERVER_DRIVER) commands.input $(EXTRA) > output.tmp
75
@$(NORMALIZE) output.tmp > output
86
$(VERIFY)
97

10-
trace: EXTRA = -debug -log=log
8+
trace: EXTRA = --extra '-debug -log=trace'
119
trace: $(TEST)
10+
11+
GDB_COMMANDS =
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CXREF -xrefactory-II -server
2+
-olcxgetprojectname CURDIR/source.c
3+
<sync>
4+
-rfct-extract-variable -olmark=49 -olcursor=44 CURDIR/source.c -p CURDIR
5+
<sync>
6+
<exit>
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1+
CXREF -xrefactory-II -server -o server-buffer
2+
-olcxgetprojectname CURDIR/source.c
3+
end-of-options
4+
5+
<sync>
6+
<set-info len=<n>>CURDIR</set-info>
7+
-rfct-extract-variable -olmark=49 -olcursor=44 CURDIR/source.c -p CURDIR
8+
end-of-options
9+
10+
<sync>
111
<extraction-dialog type=newVariable_> <str len=<n>>newVariable_</str>
212
<str len=<n>>int newVariable_ = </str>
313
<str len=<n>>;</str>
414
<int val=3 len=<n>></int>
515
</extraction-dialog>
6-
<sync>
16+
-exit
17+
end-of-options
18+
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
include ../Makefile.cli
2-
3-
4-
ARGUMENTS = -xrefactory-II -refactory -rfct-move-param -olcxparnum=1 -olcxparnum2=2 -olcursor=17 $(CURDIR)/source.c
1+
include ../Makefile.server
52

63
$(TEST):
7-
$(COMMAND) -log=log $(EXTRA) > output.tmp
4+
@-$(SERVER_DRIVER) commands.input $(EXTRA) > output.tmp
85
@$(NORMALIZE) output.tmp > output
9-
@$(VERIFY)
6+
$(VERIFY)
107

11-
trace: EXTRA=-debug
8+
trace: EXTRA = --extra '-debug -log=trace'
129
trace: $(TEST)
10+
11+
GDB_COMMANDS =

0 commit comments

Comments
 (0)