diff options
author | Pierre Ossman <ossman@cendio.se> | 2017-07-14 14:10:38 +0200 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-08-02 15:20:36 +0100 |
commit | 71c60a593b571ef49ca083ef4cbc6b02eb42da59 (patch) | |
tree | 12f65b3aeaad0387c85f6cae202a2b39d10938db | |
parent | 30e4ee9588fc68b2f96d4cf05deb2908e4a16a6e (diff) | |
download | keycodemapdb-71c60a593b571ef49ca083ef4cbc6b02eb42da59.zip keycodemapdb-71c60a593b571ef49ca083ef4cbc6b02eb42da59.tar.gz keycodemapdb-71c60a593b571ef49ca083ef4cbc6b02eb42da59.tar.bz2 |
Add tests for code-table
Signed-off-by: Pierre Ossman <ossman@cendio.se>
-rw-r--r-- | tests/.gitignore | 1 | ||||
-rw-r--r-- | tests/Makefile | 13 | ||||
-rw-r--r-- | tests/stdc++.cc | 2 | ||||
-rw-r--r-- | tests/stdc.c | 2 | ||||
-rw-r--r-- | tests/test.py | 2 |
5 files changed, 17 insertions, 3 deletions
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 @@ SOURCES := $(GEN) $(DATA) .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; |