Hi Nicolas, 2014-08-24 22:01 GMT+02:00 Nicolas Richard <[email protected]>: > Hi Mosè, > > Mosè Giordano <[email protected]> writes: >> Does someone know why this test >> --8<---------------cut here---------------start------------->8--- >> (require 'ert) >> (require 'tex-buf) >> >> (ert-deftest TeX-command-expansion () >> (should (string= >> (progn >> (add-to-list 'TeX-command-list >> (cons "Test" '("%%%% %`%' %t" TeX-run-command t t))) >> (TeX-command-expand (nth 1 (assoc "Test" TeX-command-list)) >> 'TeX-master-file)) >> (concat >> "%% \"\\input\" " (file-name-nondirectory (buffer-file-name)) >> ".tex")))) >> --8<---------------cut here---------------end--------------->8--- >> fails, though the `should' macro returns t? It seems I need to get >> familiar with ERT. > > Here, it fails with an error: > F TeX-command-expansion > (wrong-type-argument stringp nil) > because when running the test, (buffer-file-name) returns nil.
Right, thank you so much! Bye, Mosè _______________________________________________ bug-auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-auctex
