emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/nix-mode 29a93838bb 316/500: Add hello.nix to tests


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode 29a93838bb 316/500: Add hello.nix to tests
Date: Sat, 29 Jan 2022 08:27:17 -0500 (EST)

branch: elpa/nix-mode
commit 29a93838bbece7e4dc5c18b4b2dcadc47f107f66
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>

    Add hello.nix to tests
---
 tests/nix-mode-tests.el   | 12 ++++++++++++
 tests/testcases/hello.nix | 26 ++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/tests/nix-mode-tests.el b/tests/nix-mode-tests.el
index db6d5a521e..b20e4a1765 100644
--- a/tests/nix-mode-tests.el
+++ b/tests/nix-mode-tests.el
@@ -164,5 +164,17 @@ Related issue: https://github.com/NixOS/nix-mode/issues/72";
 Related issue: https://github.com/NixOS/nix-mode/issues/72";
   (with-nix-mode-test ("issue-72.nix" :indent 'nix-indent-line)))
 
+(ert-deftest nix-mode-test-indent-hello-smie ()
+  "Proper indentation of strings in a multi-line string.
+
+Related issue: https://github.com/NixOS/nix-mode/issues/72";
+  (with-nix-mode-test ("hello.nix" :indent 'smie-indent-line)))
+
+(ert-deftest nix-mode-test-indent-hello ()
+  "Proper indentation of strings in a multi-line string.
+
+Related issue: https://github.com/NixOS/nix-mode/issues/72";
+  (with-nix-mode-test ("hello.nix" :indent 'nix-indent-line)))
+
 (provide 'nix-mode-tests)
 ;;; nix-mode-tests.el ends here
diff --git a/tests/testcases/hello.nix b/tests/testcases/hello.nix
new file mode 100644
index 0000000000..63a8af99f7
--- /dev/null
+++ b/tests/testcases/hello.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "hello-${version}";
+  version = "2.10";
+
+  src = fetchurl {
+    url = "mirror://gnu/hello/${name}.tar.gz";
+    sha256 = "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i";
+  };
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "A program that produces a familiar, friendly greeting";
+    longDescription = ''
+      GNU Hello is a program that prints "Hello, world!" when you run it.
+      It is fully customizable.
+    '';
+    homepage = https://www.gnu.org/software/hello/manual/;
+    changelog = 
"https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}";;
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.eelco ];
+    platforms = platforms.all;
+  };
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]