Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Change filenames in picolibc test-ungetc-ftell,test-fgets-eof" #1

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 0 additions & 60 deletions patches/picolibc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -35,63 +35,3 @@ index b97ea3300..04b94f35c 100644
*(.gnu.linkonce.t.*)
KEEP (*(.fini .fini.*))
@PREFIX@__text_end = .;
diff --git a/test/test-fgets-eof.c b/test/test-fgets-eof.c
index 4c9e141b7..704e1a3ac 100644
--- a/test/test-fgets-eof.c
+++ b/test/test-fgets-eof.c
@@ -36,6 +36,10 @@
#include <stdio.h>
#include <string.h>

+#ifndef TEST_FILE_NAME
+#define TEST_FILE_NAME "FGETSEOF.TXT"
+#endif
+
const char *string = "123456789";

int main(void)
@@ -46,12 +50,12 @@ int main(void)
FILE *file;
int ret = 0;

- file = fopen("testfile.dat", "w");
+ file = fopen( TEST_FILE_NAME, "w" );
if(file == NULL) return 1;
fputs(string, file);
fclose(file);

- file = fopen( "testfile.dat", "r" );
+ file = fopen( TEST_FILE_NAME, "r" );
if(file == NULL) return 1;

/*Calling fgets to reach EOF and check on the returned value*/
diff --git a/test/test-ungetc-ftell.c b/test/test-ungetc-ftell.c
index 245679814..a3e702312 100644
--- a/test/test-ungetc-ftell.c
+++ b/test/test-ungetc-ftell.c
@@ -36,6 +36,10 @@
#include <stdio.h>
#include <string.h>

+#ifndef TEST_FILE_NAME
+#define TEST_FILE_NAME "UNGETCFTELL.DAT"
+#endif
+
const char *str = "This is a string";

int main(void) {
@@ -44,12 +48,12 @@ int main(void) {
char first;
long position, start;

- file = fopen( "testfile.dat", "wb" );
+ file = fopen( TEST_FILE_NAME, "wb" );
if( file == NULL ) return 1;
fputs(str, file);
fclose(file);

- file = fopen( "testfile.dat", "rb" );
+ file = fopen( TEST_FILE_NAME, "rb" );
if(file == NULL) return 1;

first = fgetc(file);
Loading