diff options
author | Paul Schoenfelder <paulschoenfelder@gmail.com> | 2014-08-12 13:23:47 -0500 |
---|---|---|
committer | Paul Schoenfelder <paulschoenfelder@gmail.com> | 2014-08-12 13:32:18 -0500 |
commit | 4c3ab5cd498d0cb46cc52fa4f9e627f68e8ef88a (patch) | |
tree | 1e76c3a45174db9a1fcb160583116ddceb62e3a4 /test | |
parent | Merge pull request #10 from jeffweiss/update_for_elixir-0.15.0 (diff) |
Handle octal format deprecation in 0.15.0
Diffstat (limited to 'test')
-rw-r--r-- | test/commands_test.exs | 4 | ||||
-rw-r--r-- | test/utils_test.exs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/commands_test.exs b/test/commands_test.exs index c84fce3..e9bdaef 100644 --- a/test/commands_test.exs +++ b/test/commands_test.exs @@ -4,9 +4,9 @@ defmodule ExIrc.CommandsTest do use Irc.Commands test "Commands are formatted properly" do - expected = <<1, "TESTCMD", 1, ?\r, ?\n>> + expected = <<0o001, "TESTCMD", 0o001, ?\r, ?\n>> assert expected == ctcp!("TESTCMD") |> IO.iodata_to_binary - expected = <<"PRIVMSG #testchan :", 0x01, "ACTION mind explodes!!", 0x01, ?\r, ?\n>> + expected = <<"PRIVMSG #testchan :", 0o001, "ACTION mind explodes!!", 0o001, ?\r, ?\n>> assert expected == me!("#testchan", "mind explodes!!") |> IO.iodata_to_binary expected = <<"PASS testpass", ?\r, ?\n>> assert expected == pass!("testpass") |> IO.iodata_to_binary diff --git a/test/utils_test.exs b/test/utils_test.exs index e079661..835af64 100644 --- a/test/utils_test.exs +++ b/test/utils_test.exs @@ -9,12 +9,12 @@ defmodule ExIrc.UtilsTest do doctest ExIrc.Utils test "Given a local date/time as a tuple, can retrieve get the CTCP formatted time" do - local_time = {{2013,12,6},{14,5,00}} # Mimics output of :calendar.local_time() + local_time = {{2013,12,6},{14,5,0}} # Mimics output of :calendar.local_time() assert Utils.ctcp_time(local_time) == "Fri Dec 06 14:05:00 2013" end test "Can parse a CTCP command" do - message = ':pschoenf NOTICE #testchan :\001ACTION mind explodes!!\001' + message = ':pschoenf NOTICE #testchan :' ++ '#{<<0o001>>}' ++ 'ACTION mind explodes!!' ++ '#{<<0o001>>}' expected = %IrcMessage{ nick: "pschoenf", cmd: "ACTION", |