Skip to content

Commit e692016

Browse files
committed
Add a test for a suffix in a --files-from list
1 parent 0135380 commit e692016

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎test/client/testsuite/suffix_file.sh‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,26 @@ tar czf t.tar.gz t1.cpp t2.cpp
182182
srcml t.tar.gz:2 --output-src
183183
check_exit 1
184184

185+
# a suffix on each file of a --files-from list
186+
defineXML fileslist <<- 'STDOUT'
187+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
188+
<unit xmlns="http://www.srcML.org/srcML/src" revision="REVISION">
189+
190+
<unit revision="REVISION" language="C++" filename="n.cpp" hash="4c867350266d08ee9d4d96a58e4069797812f83c"><expr_stmt><expr><name>n2</name></expr>;</expr_stmt>
191+
</unit>
192+
193+
<unit revision="REVISION" language="C++" filename="m.cpp" hash="423081c3c514edbf9ffebd8690c18dfcd3d60923"><expr_stmt><expr><name>a1</name></expr>;</expr_stmt>
194+
<expr_stmt><expr><name>a2</name></expr>;</expr_stmt>
195+
</unit>
196+
197+
</unit>
198+
STDOUT
199+
200+
createfile suffixlist "n.cpp:2\nm.cpp:1-2"
201+
202+
srcml --files-from suffixlist
203+
check "$fileslist"
204+
185205
# a suffix on each input file of an archive
186206
defineXML archive <<- 'STDOUT'
187207
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

0 commit comments

Comments
 (0)