summaryrefslogtreecommitdiffhomepage
path: root/contrib/luacurses/test/pair.lua
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/luacurses/test/pair.lua')
-rw-r--r--contrib/luacurses/test/pair.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/luacurses/test/pair.lua b/contrib/luacurses/test/pair.lua
new file mode 100644
index 0000000000..f269800613
--- /dev/null
+++ b/contrib/luacurses/test/pair.lua
@@ -0,0 +1,18 @@
+
+require("curses");
+
+curses.initscr();
+
+curses.start_color();
+curses.init_pair(1, curses.COLOR_BLUE, curses.COLOR_YELLOW);
+curses.init_pair(2, curses.COLOR_CYAN, curses.COLOR_RED);
+
+for i = 1, 2 do
+ local r, f, b = curses.pair_content(i);
+ curses.attrset(curses.COLOR_PAIR(i));
+ curses.addstr(f .. ", " .. b .. "\n");
+end
+
+curses.getch();
+curses.endwin();
+