libstdc++: Use dg-additional-files in some I/O tests

Use the dg-additional-files directive to declare files that need to be
copied into the test's working directory. This is currently redundant
(as all .tst and .txt files are copied for all tests) but is a step
towards not copying all files.

libstdc++-v3/ChangeLog:

	* testsuite/27_io/basic_filebuf/imbue/char/2.cc: Use
	dg-additional-files.
	* testsuite/27_io/basic_filebuf/imbue/wchar_t/2.cc: Likewise.
	* testsuite/27_io/basic_filebuf/open/char/path.cc: Likewise.
	* testsuite/27_io/basic_filebuf/pbackfail/char/9761.cc:
	Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/3-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekoff/char/3-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekpos/char/3-in.cc: Likewise.
	* testsuite/27_io/basic_filebuf/seekpos/char/3-io.cc: Likewise.
	* testsuite/27_io/basic_filebuf/setbuf/char/1.cc: Likewise.
	* testsuite/27_io/basic_filebuf/sgetn/char/3.cc: Likewise.
	* testsuite/27_io/basic_filebuf/underflow/10096.cc: Likewise.
	* testsuite/27_io/basic_fstream/cons/char/path.cc: Likewise.
	* testsuite/27_io/basic_fstream/open/char/path.cc: Likewise.
	* testsuite/27_io/basic_ifstream/assign/1.cc: Likewise.
	* testsuite/27_io/basic_ifstream/cons/move.cc: Likewise.
	* testsuite/27_io/basic_ifstream/cons/char/path.cc: Likewise.
	* testsuite/27_io/basic_ifstream/open/char/path.cc: Likewise.
	* testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: Likewise.
	* testsuite/27_io/objects/char/10.cc: Likewise.
	* testsuite/27_io/objects/char/12048-1.cc: Likewise.
	* testsuite/27_io/objects/char/12048-2.cc: Likewise.
	* testsuite/27_io/objects/char/12048-3.cc: Likewise.
	* testsuite/27_io/objects/char/12048-4.cc: Likewise.
	* testsuite/27_io/objects/char/12048-5.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/12048-1.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/12048-2.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/12048-3.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/12048-4.cc: Likewise.
	* testsuite/27_io/objects/wchar_t/12048-5.cc: Likewise.
	* testsuite/ext/stdio_sync_filebuf/char/12048-1.cc: Likewise.
	* testsuite/ext/stdio_sync_filebuf/char/12048-2.cc: Likewise.
	* testsuite/ext/stdio_sync_filebuf/char/12048-3.cc: Likewise.
	* testsuite/ext/stdio_sync_filebuf/char/12048-4.cc: Likewise.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-1.cc: Likewise.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-2.cc: Likewise.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-3.cc: Likewise.
	* testsuite/ext/stdio_sync_filebuf/wchar_t/12948-4.cc: Likewise.
This commit is contained in:
Jonathan Wakely 2024-07-22 14:01:43 +01:00 committed by Jonathan Wakely
parent dfd0753269
commit 687dc787d7
No known key found for this signature in database
37 changed files with 48 additions and 6 deletions

View file

@ -19,7 +19,9 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.8.1.4 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <locale>

View file

@ -1,4 +1,5 @@
// { dg-require-namedlocale "de_DE.ISO8859-15" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
// 2003-05-13 Benjamin Kosnik <bkoz@redhat.com>

View file

@ -19,6 +19,7 @@
// { dg-do run { target c++17 } }
// { dg-require-fileio "" }
// { dg-require-filesystem-ts "" }
// { dg-additional-files "filebuf_members-1.tst" }
#include <fstream>
#include <filesystem>

View file

@ -20,6 +20,7 @@
// 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>

View file

@ -17,9 +17,10 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.7.1.3 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.tst filebuf_members-1.tst" }
#include <fstream>
#include <testsuite_hooks.h>

View file

@ -17,9 +17,10 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 27.7.1.3 Overridden virtual functions
// C++98 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.tst filebuf_members-1.tst" }
#include <fstream>
#include <testsuite_hooks.h>

View file

@ -20,6 +20,7 @@
// 27.7.1.3 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.tst filebuf_members-1.tst" }
#include <fstream>
#include <testsuite_hooks.h>

View file

@ -20,6 +20,7 @@
// 27.7.1.3 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.tst filebuf_members-1.tst" }
#include <fstream>
#include <testsuite_hooks.h>

View file

@ -20,6 +20,7 @@
// 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <testsuite_hooks.h>

View file

@ -20,6 +20,7 @@
// 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "sgetn.txt" }
#include <fstream>
#include <testsuite_hooks.h>

View file

@ -20,6 +20,7 @@
// 27.8.1.4 Overridden virtual functions
// { dg-require-fileio "" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <fstream>
#include <string>

View file

@ -19,6 +19,7 @@
// { dg-do run { target c++17 } }
// { dg-require-fileio "" }
// { dg-require-filesystem-ts "" }
// { dg-additional-files "ofstream_members-1.tst" }
#include <fstream>
#include <filesystem>

View file

@ -19,6 +19,7 @@
// { dg-do run { target c++17 } }
// { dg-require-fileio "" }
// { dg-require-filesystem-ts "" }
// { dg-additional-files "filebuf_members-1.tst" }
#include <fstream>
#include <filesystem>

View file

@ -17,8 +17,9 @@
// { dg-do run { target c++11 } }
// { dg-require-fileio "" }
// { dg-additional-files "thirty_years_among_the_dead_preproc.txt" }
// 27.9.1.8 Assign and swap [ifstream.assign]
// C++11 27.9.1.8 Assign and swap [ifstream.assign]
#include <fstream>
#include <sstream>

View file

@ -19,6 +19,7 @@
// { dg-do run { target c++17 } }
// { dg-require-fileio "" }
// { dg-require-filesystem-ts "" }
// { dg-additional-files "ifstream_members-1.tst" }
#include <fstream>
#include <filesystem>

View file

@ -17,8 +17,9 @@
// { dg-do run { target c++11 } }
// { dg-require-fileio "" }
// { dg-additional-files "thirty_years_among_the_dead_preproc.txt" }
// 27.9.1.7 basic_ifstream constructors [ifstream.cons]
// C++11 27.9.1.7 basic_ifstream constructors [ifstream.cons]
#include <fstream>
#include <sstream>

View file

@ -19,6 +19,7 @@
// { dg-do run { target c++17 } }
// { dg-require-fileio "" }
// { dg-require-filesystem-ts "" }
// { dg-additional-files "filebuf_members-1.tst" }
#include <fstream>
#include <filesystem>

View file

@ -15,10 +15,11 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// 30.9.3.1 basic_ifstream constructors [ifstream.cons]
// C++17 30.9.3.1 basic_ifstream constructors [ifstream.cons]
// { dg-do run { target *-*-mingw* } }
// { dg-require-fileio "" }
// { dg-additional-files "ifstream_members-1.tst" }
#include <fstream>
#include <testsuite_hooks.h>

View file

@ -19,6 +19,7 @@
// { dg-require-fileio "" }
// { dg-require-binary-io "" }
// { dg-additional-files "filebuf_virtuals-1.txt" }
#include <iostream>
#include <cstdio>

View file

@ -19,6 +19,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <iostream>
#include <cstdio>

View file

@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <iostream>
#include <cstdio>

View file

@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <iostream>
#include <cstdio>

View file

@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <iostream>
#include <cstdio>

View file

@ -24,6 +24,7 @@
// { dg-do run { xfail *-*-* } }
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <iostream>
#include <cstdio>

View file

@ -19,6 +19,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <iostream>
#include <cstdio>

View file

@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <iostream>
#include <cstdio>

View file

@ -19,6 +19,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <iostream>
#include <cwchar>

View file

@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <iostream>
#include <cstdio>

View file

@ -21,6 +21,7 @@
// { dg-do run { xfail *-*-* } }
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <iostream>
#include <cstdio>

View file

@ -18,6 +18,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <ext/stdio_sync_filebuf.h>
#include <testsuite_hooks.h>

View file

@ -18,6 +18,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <ext/stdio_sync_filebuf.h>
#include <testsuite_hooks.h>

View file

@ -18,6 +18,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <ext/stdio_sync_filebuf.h>
#include <testsuite_hooks.h>

View file

@ -18,6 +18,7 @@
// <http://www.gnu.org/licenses/>.
// { dg-require-fileio "" }
// { dg-additional-files "cin_unget-1.txt" }
#include <ext/stdio_sync_filebuf.h>
#include <testsuite_hooks.h>

View file

@ -17,6 +17,8 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-additional-files "cin_unget-1.txt" }
#include <ext/stdio_sync_filebuf.h>
#include <testsuite_hooks.h>

View file

@ -20,6 +20,8 @@
#include <ext/stdio_sync_filebuf.h>
#include <testsuite_hooks.h>
// { dg-additional-files "cin_unget-1.txt" }
// libstdc++/12048
void test03()
{

View file

@ -17,6 +17,8 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-additional-files "cin_unget-1.txt" }
#include <ext/stdio_sync_filebuf.h>
#include <testsuite_hooks.h>

View file

@ -17,6 +17,8 @@
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-additional-files "cin_unget-1.txt" }
#include <ext/stdio_sync_filebuf.h>
#include <testsuite_hooks.h>