commit: 2ed0fe01d068fd00cb8d2a90206352764cb252da
parent db49251a38ab2f3805aa771b39e0abe3d59b63cc
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Tue, 4 Oct 2022 09:11:27 +0200
Replace java fixture to a recompilable one
Diffstat:
9 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/.reuse/dep5 b/.reuse/dep5
@@ -3,6 +3,6 @@ Upstream-Name: deblob
Upstream-Contact: deblob Authors <https://hacktivis.me/projects/deblob>
Source: https://hacktivis.me/projects/deblob
-Files: test/fixtures/pyc/*.pyc test/fixtures/hello.luac*
+Files: test/fixtures/pyc/*.pyc test/fixtures/hello.luac* test/fixtures/hello.class
Copyright: 2019-2022 deblob Authors <https://hacktivis.me/projects/deblob>
License: BSD-3-Clause
diff --git a/LICENSES/WTFPL.txt b/LICENSES/WTFPL.txt
@@ -1,11 +0,0 @@
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-Version 2, December 2004
-
-Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
-
-Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
-
-DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
diff --git a/Makefile b/Makefile
@@ -13,9 +13,10 @@ HAREFLAGS ?=
CFLAGS ?= -Os -s
MANDOC ?= mandoc
REUSE ?= reuse
+JAVAC ?= javac
EXE = deblob
-TEST_BLOBS = test/fixtures/hello test/fixtures/hello.a test/fixtures/hello.o test/fixtures/hello.exe test/fixtures/hello.luac53 test/fixtures/hello.luac54 test/fixtures/hello.wasm
+TEST_BLOBS = test/fixtures/hello test/fixtures/hello.a test/fixtures/hello.o test/fixtures/hello.exe test/fixtures/hello.luac53 test/fixtures/hello.luac54 test/fixtures/hello.wasm test/fixtures/hello.class
all: $(EXE)
@@ -47,6 +48,9 @@ test/fixtures/hello.luac54: test/fixtures/hello.lua
test/fixtures/hello.wasm: test/fixtures/hello.wat
wat2wasm -o $@ test/fixtures/hello.wat
+test/fixtures/hello.class: test/fixtures/hello.java
+ $(JAVAC) test/fixtures/hello.java
+
.PHONY: test
test: all $(TEST_BLOBS)
rm -fr test/check_dir-fixtures
diff --git a/README.md b/README.md
@@ -34,7 +34,6 @@ make
The following fixtures are either manually built or copied from another project and aren't removed with `make clean`:
- Files in `test/fixtures/pyc/` are made via running `./test/python_compile.py`
- `Elixir.Hex.API.Auth.beam` was copied from an installed Elixir 1.13.3
-- `FirstRepeatingElement.class` was downloaded from <https://bae.st/objects/873a9ede-7995-4c38-b64a-0d49d2c0e98c>
- `monodx.dll` is `lib/x86/monodx.dll` from wine-mono 7.0.0
- `qemu_vga.ndrv` is `pc-bios/qemu_vga.ndrv` from QEMU 7.0.0
diff --git a/main.ha b/main.ha
@@ -72,6 +72,8 @@ fn is_blob(filename: str) (bool | fs::error | io::error) = {
("test/fixtures/hello.cs", false),
("test/fixtures/hello.lua", false),
("test/fixtures/hello.wat", false),
+ ("test/fixtures/hello.py", false),
+ ("test/fixtures/hello.java", false),
("test/fixtures/hello", true),
("test/fixtures/hello.luac53", true),
("test/fixtures/hello.luac54", true),
@@ -80,9 +82,9 @@ fn is_blob(filename: str) (bool | fs::error | io::error) = {
("test/fixtures/hello.exe", true),
("test/fixtures/monodx.dll", true),
("test/fixtures/hello.wasm", true),
+ ("test/fixtures/hello.class", true),
("test/fixtures/Elixir.Hex.API.Auth.beam", true),
//("test/fixtures/option.rom", true),
- ("test/fixtures/FirstRepeatingElement.class", true),
("test/fixtures/qemu_vga.ndrv", true),
("test/fixtures/empty", false),
];
diff --git a/test/fixtures/FirstRepeatingElement.class b/test/fixtures/FirstRepeatingElement.class
Binary files differ.
diff --git a/test/fixtures/FirstRepeatingElement.class.license b/test/fixtures/FirstRepeatingElement.class.license
@@ -1,2 +0,0 @@
-SPDX-FileCopyrightText: 2022 xianc78 <https://bae.st/users/xianc78>
-SPDX-License-Identifier: WTFPL
diff --git a/test/fixtures/hello.class b/test/fixtures/hello.class
Binary files differ.
diff --git a/test/fixtures/hello.java b/test/fixtures/hello.java
@@ -0,0 +1,8 @@
+// SPDX-FileCopyrightText: 2019-2022 deblob Authors <https://hacktivis.me/projects/deblob>
+// SPDX-License-Identifier: BSD-3-Clause
+
+public class hello {
+ public static void main(String[] args) {
+ System.out.println("Hello World!");
+ }
+}