Introduction
Introduction Statistics Contact Development Disclaimer Help
test-case (start) - surf-adblock - Surf adblock web extension
git clone git://git.codemadness.org/surf-adblock
Log
Files
Refs
README
LICENSE
---
commit 55fbb08b97fe45d1d104f99ec1fe43261f322865
parent 08e747efa80a44603f80db0fdacb3f63ad210b8e
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 4 Jun 2017 14:22:18 +0200
test-case (start)
Diffstat:
A .gitignore | 6 ++++++
A adblock.h | 5 +++++
D tests/debug.sh | 18 ------------------
A tests/run.sh | 4 ++++
M tests/tests.c | 2 ++
5 files changed, 17 insertions(+), 18 deletions(-)
---
diff --git a/.gitignore b/.gitignore
@@ -0,0 +1,6 @@
+*.o
+*.core
+*.lo
+*.la
+tests/tests
+surf-adblock
diff --git a/adblock.h b/adblock.h
@@ -0,0 +1,5 @@
+int checkrequest(const char *, const char *);
+void cleanup(void);
+char *getdocumentcss(const char *);
+char *getglobalcss(void);
+void init(void);
diff --git a/tests/debug.sh b/tests/debug.sh
@@ -1,18 +0,0 @@
-#!/bin/sh
-# ugly debug script: compile as standalone program for testing.
-
-cc -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include \
- `pkg-config --cflags gtk+-3.0 webkit2gtk-4.0 webkit2gtk-web-extension…
- -DVERSION=\"0.1\" -DWEBEXTDIR=\"/usr/local/lib/surf\" -D_DEFAULT_SOUR…
- -DWEBEXTDIR=\"/usr/local/lib/surf\" \
- `pkg-config --cflags gtk+-3.0 webkit2gtk-4.0 webkit2gtk-web-extension…
- -DDEBUG \
- -c surf-adblock.c
-cc -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 \
- `pkg-config --libs gtk+-3.0 webkit2gtk-4.0 webkit2gtk-web-extension-4…
- surf-adblock.o
-
-chmod +x surf-adblock
-# NOTE: need to copy because of W^X.
-cp surf-adblock /usr/local/bin
-time /usr/local/bin/surf-adblock
diff --git a/tests/run.sh b/tests/run.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+rm -f *.o tests
+cc tests.c -o tests -Wall
+SURF_ADBLOCK_FILE=`pwd`/rules ./tests
diff --git a/tests/tests.c b/tests/tests.c
@@ -1,3 +1,5 @@
+#include "../adblock.c"
+
int
main(void)
{
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.