fix: noconfirm auto-selects first AUR match
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys, subprocess
|
||||
|
||||
prog, infile, outfile = sys.argv[1:]
|
||||
|
||||
subprocess.check_call([prog, infile, outfile])
|
||||
@@ -0,0 +1,23 @@
|
||||
#include<stdio.h>
|
||||
#include<assert.h>
|
||||
|
||||
#define BUFSIZE 1024
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
char buffer[BUFSIZE];
|
||||
size_t num_read;
|
||||
size_t num_written;
|
||||
FILE *fin = fopen(argv[1], "rb");
|
||||
FILE *fout;
|
||||
assert(argc>0);
|
||||
assert(fin);
|
||||
num_read = fread(buffer, 1, BUFSIZE, fin);
|
||||
assert(num_read > 0);
|
||||
fclose(fin);
|
||||
fout = fopen(argv[2], "wb");
|
||||
assert(fout);
|
||||
num_written = fwrite(buffer, 1, num_read, fout);
|
||||
assert(num_written == num_read);
|
||||
fclose(fout);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
int func(void) {
|
||||
return 42;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
runner = find_program('copyrunner.py')
|
||||
|
||||
copier = executable('copier', 'filecopier.c', native: true)
|
||||
|
||||
cg = generator(runner,
|
||||
output: ['@BASENAME@.c'],
|
||||
arguments: [copier.full_path(), '@INPUT@', '@OUTPUT@'],
|
||||
depends: copier)
|
||||
|
||||
test('generatordep',
|
||||
executable('gd', 'prog.c', cg.process('libsrc.c.in')))
|
||||
@@ -0,0 +1,5 @@
|
||||
int func(void);
|
||||
|
||||
int main(void) {
|
||||
return func() != 42;
|
||||
}
|
||||
Reference in New Issue
Block a user