Hard-code the LANG env var so that `make test` passes *everywhere*

Ref: The auto locale detection test failure ("ja_JP" vs "en_US") in
https://github.com/kaushalmodi/ox-hugo/issues/195#issuecomment-416486948
master
Kaushal Modi 8 years ago
parent f139244121
commit cd33b6e356
  1. 5
      Makefile
  2. 10
      test/site/content-org/all-posts.org
  3. 4
      test/site/content/posts/locale-auto-detect.md
  4. 4
      test/site/content/posts/locale-specified.md

@ -1,4 +1,4 @@
# Time-stamp: <2018-08-27 13:31:30 kmodi>
# Time-stamp: <2018-08-28 10:45:59 kmodi>
# Makefile to export org documents to md for Hugo from the command line
# Run just "make" to see usage examples.
@ -101,6 +101,8 @@ help:
# version that ships with Emacs and then run the stuff in --eval that
# loads the new Org version.. and thus we'll end up with mixed Org in
# the load-path.
# The LANG env var is hard-coded to "en_US.UTF-8" so that the Locale
# auto-detection test always passes.
emacs-batch:
@echo ""
@echo "$(ORG_FILE) ::"
@ -109,6 +111,7 @@ emacs-batch:
(toggle-debug-on-error)\
(setenv \"OX_HUGO_ELPA\" \"$(OX_HUGO_ELPA)\")\
(when (> (length \"$(TIMEZONE)\") 0) (setenv \"TZ\" \"$(TIMEZONE)\"))\
(setenv \"LANG\" \"en_US.UTF-8\")\
(setq-default make-backup-files nil)\
(load-file (expand-file-name \"setup-ox-hugo.el\" \"$(OX_HUGO_TEST_DIR)\"))\
)" $(ORG_FILE) \

@ -5443,10 +5443,20 @@ Post content.
:EXPORT_FILE_NAME: locale-specified
:EXPORT_HUGO_LOCALE: es_ES
:END:
#+begin_description
Specify the locale using ~:EXPORT_HUGO_LOCALE: es_ES~ property.
#+end_description
Locale exporting is enabled using ~:EXPORT_HUGO_WITH_LOCALE: t~ in the
post's parent subtree.
*** Auto-detected locale in front-matter :auto_detect:
:PROPERTIES:
:EXPORT_FILE_NAME: locale-auto-detect
:END:
#+begin_description
Locale is not specified, so is auto-detected.
#+end_description
Locale exporting is enabled using ~:EXPORT_HUGO_WITH_LOCALE: t~ in the
post's parent subtree.
** Images :images:
*** Single image :single:
:PROPERTIES:

@ -1,6 +1,10 @@
+++
title = "Auto-detected locale in front-matter"
description = "Locale is not specified, so is auto-detected."
tags = ["front-matter", "locale", "auto-detect"]
draft = false
locale = "en_US"
+++
Locale exporting is enabled using `:EXPORT_HUGO_WITH_LOCALE: t` in the
post's parent subtree.

@ -1,6 +1,10 @@
+++
title = "Specified locale in front-matter"
description = "Specify the locale using `:EXPORT_HUGO_LOCALE: es_ES` property."
tags = ["front-matter", "locale"]
draft = false
locale = "es_ES"
+++
Locale exporting is enabled using `:EXPORT_HUGO_WITH_LOCALE: t` in the
post's parent subtree.

Loading…
Cancel
Save