diff --git a/emacspy.pyx b/emacspy.pyx index 51d1a17..014bdde 100644 --- a/emacspy.pyx +++ b/emacspy.pyx @@ -165,7 +165,7 @@ cdef class EmacsValue: my_type = self.type() if my_type == "string": return self.str() - elif my_type == "intiger": + elif my_type == "integer": return self.int() def __str__(self): diff --git a/tests/test.el b/tests/test.el index 71b1f2d..941bfda 100644 --- a/tests/test.el +++ b/tests/test.el @@ -62,3 +62,11 @@ (ert-deftest ert-test-emacspy-duplicate-load () (should-error (progn (load "emacspy") (load "emacspy")))) + +(ert-deftest ert-test-emacspy-data-int () + (should (py-set-global "test" 1 "test_int")) + (should (eq 1 (py-get-global-variable "test" "test_int"))) + (should (py-set-global "test" -1 "test_int")) + (should (eq -1 (py-get-global-variable "test" "test_int"))) + (should (py-set-global "test" 0 "test_int")) + (should (eq 0 (py-get-global-variable "test" "test_int"))) )