1########################################################
2#
3# ISSUE 1023
4#
5########################################################
6
7body common control
8{
9      inputs => { "../../default.cf.sub" };
10      bundlesequence => { default("$(this.promise_filename)") };
11      version => "1.0";
12}
13
14########################################################
15
16bundle agent init
17{
18  vars:
19      "actual1qaz" string => "";
20      "actual2qaz" string => "";
21      "actual3qaz" string => "";
22
23      "expected1qaz" string => "AAAA";
24      "expected2qaz" string => "AAAA";
25      "expected3qaz" string => "AAAA";
26
27      "files" slist => { "actual1qaz", "expected1qaz", "actual2qaz", "expected2qaz",
28			 "actual3qaz", "expected3qaz" };
29
30
31  files:
32      "$(G.testfile).actual1qaz" touch => "true";
33      "$(G.testfile).actual2qaz" touch => "true";
34      "$(G.testfile).actual3qaz" touch => "true";
35
36      "$(G.testfile).expected1qaz"
37      touch => "true",
38      edit_line => init_insert("$(expected1qaz)");
39      "$(G.testfile).expected2qaz"
40      touch => "true",
41      edit_line => init_insert("$(expected1qaz)");
42      "$(G.testfile).expected3qaz"
43      touch => "true",
44      edit_line => init_insert("$(expected1qaz)");
45}
46
47bundle edit_line init_insert(str)
48{
49  insert_lines:
50      "$(str)";
51}
52
53body edit_defaults init_empty
54{
55      empty_file_before_editing => "true";
56}
57
58bundle agent test
59{
60  meta:
61      "test_suppress_fail" string => "windows",
62        meta => { "redmine5120" };
63
64  files:
65      "$(G.testfile).(actual)?\dq.*"
66      pathtype => "regex",
67      edit_line => example_edit_line;
68}
69
70bundle edit_line example_edit_line
71{
72  insert_lines:
73      "AAAA";
74}
75
76bundle agent check
77{
78  methods:
79      "first" usebundle => dcs_check_diff("$(G.testfile).actual1qaz",
80                                              "$(G.testfile).expected1qaz",
81                                              "$(this.promise_filename)");
82      "second" usebundle => dcs_check_diff("$(G.testfile).actual2qaz",
83                                               "$(G.testfile).expected2qaz",
84                                               "$(this.promise_filename)");
85      "third" usebundle => dcs_check_diff("$(G.testfile).actual3qaz",
86                                              "$(G.testfile).expected3qaz",
87                                              "$(this.promise_filename)");
88}
89### PROJECT_ID: core
90### CATEGORY_ID: 27
91