Add tests for code-table Signed-off-by: Pierre Ossman <ossman@cendio.se>
diff --git a/tests/.gitignore b/tests/.gitignore index bda4ab4..d7e92ec 100644 --- a/tests/.gitignore +++ b/tests/.gitignore
@@ -1,3 +1,4 @@ osx2win32.* +osx.* stdc stdc++
diff --git a/tests/Makefile b/tests/Makefile index b396b4d..af02ee2 100644 --- a/tests/Makefile +++ b/tests/Makefile
@@ -13,20 +13,27 @@ .DELETE_ON_ERROR: -stdc: stdc.c osx2win32.h +stdc: stdc.c osx2win32.h osx.h $(CC) -o $@ $^ osx2win32.h: $(SOURCES) $(GEN) --lang stdc code-map $(DATA) osx win32 > $@ +osx.h: $(SOURCES) + $(GEN) --lang stdc code-table $(DATA) osx > $@ -stdc++: stdc++.cc osx2win32.hh +stdc++: stdc++.cc osx2win32.hh osx.hh $(CC) -o $@ $^ osx2win32.hh: $(SOURCES) $(GEN) --lang stdc++ code-map $(DATA) osx win32 > $@ +osx.hh: $(SOURCES) + $(GEN) --lang stdc++ code-table $(DATA) osx > $@ -python2: osx2win32.py +python2: osx2win32.py osx.py osx2win32.py: $(SOURCES) $(GEN) --lang python2 code-map $(DATA) osx win32 > $@ +osx.py: $(SOURCES) + $(GEN) --lang python2 code-table $(DATA) osx > $@ clean: rm -f osx2win32.* + rm -f osx.* rm -f stdc stdc++
diff --git a/tests/stdc++.cc b/tests/stdc++.cc index 51727cf..251bb84 100644 --- a/tests/stdc++.cc +++ b/tests/stdc++.cc
@@ -9,10 +9,12 @@ #include <assert.h> #include "osx2win32.hh" +#include "osx.hh" int main(int argc, char** argv) { assert(code_map_osx_to_win32[0x1d] == 0x30); + assert(code_table_osx[0x1d] == 0x3b); return 0; }
diff --git a/tests/stdc.c b/tests/stdc.c index 152357d..2e880da 100644 --- a/tests/stdc.c +++ b/tests/stdc.c
@@ -9,10 +9,12 @@ #include <assert.h> #include "osx2win32.h" +#include "osx.h" int main(int argc, char** argv) { assert(code_map_osx_to_win32[0x1d] == 0x30); + assert(code_table_osx[0x1d] == 0x3b); return 0; }
diff --git a/tests/test.py b/tests/test.py index 0efdafa..6577115 100644 --- a/tests/test.py +++ b/tests/test.py
@@ -6,5 +6,7 @@ # and 3-clause BSD licenses. import osx2win32 +import osx assert osx2win32.code_map_osx_to_win32[0x1d] == 0x30 +assert osx.code_table_osx[0x1d] == 0x3b;