Skip to content

Commit 744915f

Browse files
committed
Added more test files.
1 parent 6358b7d commit 744915f

File tree

6 files changed

+103
-2
lines changed

6 files changed

+103
-2
lines changed

test/TestConfiguration.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ namespace shellanything { namespace test
104104

105105
//test configuration files
106106
"test_files\\samples.xml",
107-
"test_files\\test_issue011.xml",
108107
"test_files\\TestConfigManager.testAssignCommandId.1.xml",
109108
"test_files\\TestConfigManager.testAssignCommandId.2.xml",
110109
"test_files\\TestConfigManager.testAssignCommandIdsInvalid.xml",
@@ -121,7 +120,7 @@ namespace shellanything { namespace test
121120
"test_files\\tests.xml",
122121
};
123122
const size_t num_files = sizeof(files)/sizeof(files[0]);
124-
123+
125124
//for each test files
126125
for(size_t i=0; i<num_files; i++)
127126
{
4.19 KB
Binary file not shown.

test/test_files/issue036.xml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<shell>
4+
<menu separator="true" />
5+
<menu name="*** issue36 *** (test unicode icon)">
6+
<icon path="${env.USERPROFILE}\ShellAnything\issue36.psiΨpsi.ico" index="0" />
7+
8+
<menu name="test unicode prompt" description="test for copyright and omega characters">
9+
<actions>
10+
<prompt name="myarguments" title="z©z" default="Hugh _Ω_ Jass" />
11+
</actions>
12+
</menu>
13+
14+
<menu name="test unicode clipboard" description="test for psi letter">
15+
<actions>
16+
<clipboard value="psi letter: _Ψ_"/>
17+
</actions>
18+
</menu>
19+
20+
<menu name="test unicode file" description="test for psi letter">
21+
<actions>
22+
<property name="my_file" value="${env.USERPROFILE}\config.ini" />
23+
<prompt name="foo" title="FILE:${my_file}" default="${my_file}" />
24+
<file path="${env.USERPROFILE}\myapp.ini">selection=${selection.path}</file>
25+
<prompt name="foo" title="File saved succesfuly" default="${my_file}" />
26+
</actions>
27+
</menu>
28+
29+
<menu name="test unicode menu: '${selection.filename}'" description="test for utf-8 string in ${selection.filename}" />
30+
31+
<menu name="test exec #1 (open in notepad)" description="test for utf-8 start process with arguments">
32+
<visibility maxfiles="1" maxfolders="0" />
33+
<actions>
34+
<exec path="C:\Windows\notepad.exe" arguments="${selection.path}" />
35+
</actions>
36+
</menu>
37+
<menu name="test exec #2 (echo in cmd.exe)" description="test for utf-8 start process">
38+
<visibility maxfiles="1" maxfolders="0" />
39+
<actions>
40+
<exec path="C:\Windows\system32\cmd.exe" arguments="/k echo You clicked on file '${selection.path}'" />
41+
</actions>
42+
</menu>
43+
<menu name="test exec #3 (popargsA)" description="">
44+
<visibility maxfiles="1" maxfolders="0" />
45+
<actions>
46+
<exec path="G:\ftp\printargs\printargsA\Debug\popargsA.exe" arguments="${selection.path}" />
47+
</actions>
48+
</menu>
49+
<menu name="test exec #4 (popargsW)" description="">
50+
<visibility maxfiles="1" maxfolders="0" />
51+
<actions>
52+
<exec path="G:\ftp\printargs\printargsA\Debug\popargsW.exe" arguments="${selection.path}" />
53+
</actions>
54+
</menu>
55+
<menu name="test exec #5 (printargsA)" description="">
56+
<visibility maxfiles="1" maxfolders="0" />
57+
<actions>
58+
<exec path="G:\ftp\printargs\printargsA\Debug\printargsA.exe" arguments="${selection.path}" />
59+
</actions>
60+
</menu>
61+
<menu name="test exec #6 (printargsW)" description="">
62+
<visibility maxfiles="1" maxfolders="0" />
63+
<actions>
64+
<exec path="G:\ftp\printargs\printargsA\Debug\printargsW.exe" arguments="${selection.path}" />
65+
</actions>
66+
</menu>
67+
68+
</menu>
69+
<menu separator="true" />
70+
</shell>
71+
</root>

test/test_files/issue041.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<shell>
4+
<menu separator="true" />
5+
<menu name="*** issue41 ***">
6+
<menu name="test prompt" description="">
7+
<actions>
8+
<prompt name="myarguments" title="foo${newline}bar" default="${selection.path}" type="ok" />
9+
</actions>
10+
</menu>
11+
</menu>
12+
<menu separator="true" />
13+
</shell>
14+
</root>

test/test_files/issue044.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<shell>
4+
<menu separator="true" />
5+
<menu name="*** issue44 ***">
6+
<menu name="save selection">
7+
<visibility maxfiles="1" maxfolders="0" />
8+
<actions>
9+
<file encoding="utf-8" path="${env.USERPROFILE}\shellanything.issue44.selection.utf-8.txt" >selection=${selection.path}</file>
10+
<file encoding="ansi" path="${env.USERPROFILE}\shellanything.issue44.selection.ansi.txt" >selection=${selection.path}</file>
11+
<file encoding="unicode" path="${env.USERPROFILE}\shellanything.issue44.selection.unicode.txt" >selection=${selection.path}</file>
12+
</actions>
13+
</menu>
14+
</menu>
15+
<menu separator="true" />
16+
</shell>
17+
</root>

0 commit comments

Comments
 (0)