You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -73,56 +75,71 @@ On ubuntu you will need python3, pip3 and pytest & xmltodict modules:
73
75
74
76
Then, you shall change directory to `ct` and just execute `pytest`:
75
77
76
-
cd ct
77
-
pytest
78
+
```bash
79
+
$ cd ct
80
+
$ pytest
81
+
```
78
82
79
83
### Execute example
80
84
81
-
examples/json2xml
82
-
83
-
This will show the correct usage:
84
-
85
-
Usage: json2xml <json file|test: harcoded test>
85
+
```bash
86
+
$ examples/json2xml
87
+
$ Usage: json2xml <json file|test: harcoded test>
88
+
```
86
89
87
90
#### Passing file
88
91
89
-
examples/json2xml test.json
92
+
```bash
93
+
$ examples/json2xml test.json
94
+
```
90
95
91
96
This will output the xml representation, or an error.
92
97
93
98
#### Passing 'test' to execute harcoded case
94
99
95
-
examples/json2xml test
100
+
```bash
101
+
$ examples/json2xml test
102
+
```
96
103
97
104
Same as above, but using a harcoded json string (check [here](https://github.com/testillano/json2xml/blob/d2778a1891244603284796df6892733b5362324e/examples/main.cpp#L28)).
98
105
99
106
#### Double check (manual testing)
100
107
101
108
You could do the opposite (xml to json) using python `xmltodict`:
102
109
103
-
python3 check.py
110
+
```bash
111
+
$ python3 check.py
112
+
```
104
113
105
114
### Build and test with docker
106
115
107
116
#### Build
108
117
109
118
You may remove `cmake` cache from native workflow described above:
110
119
111
-
find . -name CMakeCache.txt -exec rm {} \;
120
+
```bash
121
+
$ find . -name CMakeCache.txt -exec rm {} \;
122
+
```
112
123
113
124
Or perhaps you could execute:
114
125
115
-
git clean -xdf
126
+
```bash
127
+
$ git clean -xdf
128
+
```
116
129
117
130
Now, you will build the compilation docker image, and then build:
0 commit comments