diff options
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | src/libutil/util.hh | 1 | ||||
-rw-r--r-- | tests/errors/local.mk | 17 | ||||
-rw-r--r-- | tests/errors/main.cc | 6 |
4 files changed, 24 insertions, 3 deletions
@@ -15,7 +15,8 @@ makefiles = \ misc/upstart/local.mk \ doc/manual/local.mk \ tests/local.mk \ - tests/plugins/local.mk + tests/plugins/local.mk \ + tests/errors/local.mk -include Makefile.config diff --git a/src/libutil/util.hh b/src/libutil/util.hh index d69e29158..0b55c6788 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -3,6 +3,7 @@ #include "types.hh" #include "logging.hh" #include "ansicolor.hh" +#include "error.hh" #include <sys/types.h> #include <sys/stat.h> diff --git a/tests/errors/local.mk b/tests/errors/local.mk new file mode 100644 index 000000000..c5b9cc5c8 --- /dev/null +++ b/tests/errors/local.mk @@ -0,0 +1,17 @@ +programs += error-test + +error-test_DIR := $(d) + +error-test_SOURCES := \ + $(wildcard $(d)/*.cc) \ + +error-test_LIBS = libutil + +error-test_LDFLAGS = -pthread $(SODIUM_LIBS) $(EDITLINE_LIBS) $(BOOST_LDFLAGS) -lboost_context -lboost_thread -lboost_system + +# $(foreach name, \ +# nix-build nix-channel nix-collect-garbage nix-copy-closure nix-daemon nix-env nix-hash nix-instantiate nix-prefetch-url nix-shell nix-store, \ +# $(eval $(call install-symlink, nix, $(bindir)/$(name)))) +# $(eval $(call install-symlink, $(bindir)/nix, $(libexecdir)/nix/build-remote)) + +# src/nix-env/user-env.cc: src/nix-env/buildenv.nix.gen.hh diff --git a/tests/errors/main.cc b/tests/errors/main.cc index 35d2a1cdf..39adc2ece 100644 --- a/tests/errors/main.cc +++ b/tests/errors/main.cc @@ -12,7 +12,7 @@ int main() { using namespace nix; - ErrorInfo::programName = optional("errorTest"); + ErrorInfo::programName = optional("error-test"); /* ColumnRange columnRange; @@ -59,7 +59,9 @@ int main() .columnRange(13,7) .linesOfCode(nullopt ,"this is the problem line of code" - ,nullopt)); + ,nullopt) + .hint(hintfmt("this hint has %1% templated %2%!!") % "yellow" % "values") + ); printErrorInfo(MkNixError() .name("error name") |