We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2b0f31 commit 82c9a8aCopy full SHA for 82c9a8a
lib/iex/test/iex/config_test.exs
@@ -0,0 +1,23 @@
1
+Code.require_file("../test_helper.exs", __DIR__)
2
+
3
+defmodule IEx.ConfigTest do
4
+ use ExUnit.Case, async: true
5
6
+ import IEx.Config
7
8
+ describe "prompt" do
9
+ test "converts everything before opening parens to dots" do
10
+ assert prompt(~c"iex(321)>") == ~c"...(321)>"
11
+ assert prompt(~c"foo-bar(321)>") == ~c".......(321)>"
12
+ end
13
14
+ test "falls back to Erlang wit no parens around" do
15
+ assert prompt(~c"foo-bar>") == ~c" .. "
16
17
18
+ test "ignores ansi escapes" do
19
+ assert prompt(~c"#{IO.ANSI.red()}iex(foo)>") == ~c"...(foo)>"
20
+ assert prompt(~c"#{IO.ANSI.red()}foo-bar>") == ~c" .. "
21
22
23
+end
0 commit comments