Commit Graph

11 Commits

Author SHA1 Message Date
pantor
dadbb856cd add config throw_missing_includes, search_in_files 2020-06-27 17:47:58 +02:00
pantor
d25a4de54f show location for render errors 2020-06-27 17:05:56 +02:00
pantor
5cc3e30b66 add clang-format 2020-06-16 18:53:41 +02:00
pantor
93b307b079 add throw test for complete file 2020-03-21 15:00:39 +01:00
pantor
62d8593e6c move unit tests to doctest 2020-03-18 13:41:11 +01:00
pantor
258def7bf0 little bit more code style 2019-09-14 12:28:55 +02:00
pantor
a6a61586a4 code style (cpplint) 2019-09-14 12:05:51 +02:00
pantor
d25937a85b add test and readme 2019-09-08 16:19:50 +02:00
Tom
419c93c840 Throw exception if a file cannot be opened, fix travis-ci builds (#117)
* throw exception if a file cannot be opened

* Add a new function in utils.hpp: open_file_or_throw: This function
  returns an opened std::ifstream or throws by calling `inja_throw`.
* Use this function in Parser::load_file which previously returned an
  empty string if the file couldn't be opened.
* Use this function in Environment::load_json which previously threw
  a `nlohmann::detail::parse_error` if the file couldn't be opened.
* In Parser::parse_statement: When including files through `include`,
  do not attempt to (re-)parse templates from files that were already
  included. Additionally, this prevents inja from attempting to load
  in-memory templates by their name from disk.
* Add tests that check if an exception is thrown when attempting to
  open files that do not exist.

* cmake: enable C++11

* cmake: require C++11 when depending on single_inja

* code style
2019-09-08 15:05:01 +02:00
Lars Berscheid
a9d4ca9a4e fix string view reference movement in bytecode 2019-01-07 16:41:16 +01:00
pantor
699c207c8c Inja v2 (#67)
* inja2

* header only

* reduce dependencies

* code cleaning

* c++17

* use stdc++

* code cleaning

* infrastructure

* header only

* add infrastructure

* fix tests

* use minimum clang 6

* code cleaning, polyfill for c++11

* fix some file tests

* fix readme

* update appveyor

* fix polyfill and ci

* fix polyfill

* fix ci?

* test msvc __cplusplus

* add doxygen

* activate all tests

* code cleaning

* add coveralls, set default to dot notation

* add html test

* add doxygen comments

* test single_include file

* change build folder in appveyor

* correct make arguments in appveyor

* fix appveyor arguments
2018-12-23 16:13:15 +01:00