[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste 2c399a0 243/298: Tests: Add unit tests for sheban
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste 2c399a0 243/298: Tests: Add unit tests for shebangs to override major-mode |
Date: |
Thu, 9 Dec 2021 19:00:22 -0500 (EST) |
branch: elpa/webpaste
commit 2c399a0f80bc488312035e3f8a34288cb5988f2b
Author: Elis Hirwing <elis@hirwing.se>
Commit: Elis Hirwing <elis@hirwing.se>
Tests: Add unit tests for shebangs to override major-mode
---
tests/unit/test-webpaste-get-language.el | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/tests/unit/test-webpaste-get-language.el
b/tests/unit/test-webpaste-get-language.el
index eb2ee81..17d9e4a 100644
--- a/tests/unit/test-webpaste-get-language.el
+++ b/tests/unit/test-webpaste-get-language.el
@@ -27,6 +27,19 @@
;; contains a bash shebang.
(expect (webpaste--get-shebang-lang-mode)
:to-equal
- 'bash-mode))))
+ 'bash-mode)))
+
+ (it
+ "will use shebangs before major-mode"
+
+ ;; Setup.
+ (let ((major-mode 'fundamental-mode)
+ (webpaste--provider-lang-alists '(("https://example.com/" .
+ ((fundamental-mode . "text")
+ (bash-mode . "bash"))))))
+
+ (expect (webpaste--get-buffer-language "https://example.com/")
+ :to-equal
+ "bash"))))
;;; test-webpaste-get-language.el ends here
- [nongnu] elpa/webpaste 8d5e884 200/298: Added skeleton of documentation for creation of custom providers., (continued)
- [nongnu] elpa/webpaste 8d5e884 200/298: Added skeleton of documentation for creation of custom providers., ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 655a364 205/298: Remove local variables since it became easier to get the providers, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d6967bd 217/298: Check emacs version after emacs install, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 2da60b8 223/298: Bump version for new release, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 1925521 228/298: Add emacs 26.1 to tests, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 9c5e921 234/298: WP-25: Add README for raw pastes, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 3d639f1 256/298: Merge branch 'fix-undercover', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 51b20d9 235/298: Merge branch 'WP-25-raw-pastes', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 22f64b7 255/298: undercover: Fix up undercover reporting, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste a8b682a 239/298: Add toml lang to ptpb.pw default, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 2c399a0 243/298: Tests: Add unit tests for shebangs to override major-mode,
ELPA Syncer <=
- [nongnu] elpa/webpaste a3a9a77 251/298: Remove spaces at end of lines, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 7345c5f 252/298: [providers] Deprecation of ptpb.pw as a provider, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 521de6d 247/298: Update copyright year, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 87ea8b1 294/298: workflows: Remove environment variable to force install cask on macos, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 7d8e0d4 287/298: wepaste: Add provider paste.rs, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste a9c4aa4 288/298: Merge branch 'provider-paste-rs', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste b47767f 229/298: Prefix integration test names to filter them out easily if they seem, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 356e54f 242/298: Tests: Add unit test for webpaste--get-shebang-lang-mode, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste b8e9245 230/298: Add helper function to find buffers language for provider, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d6a8771 250/298: Merge branch 'vapniks-patch-1', ELPA Syncer, 2021/12/09