about summary refs log blame commit diff stats
path: root/config.mk
blob: bd9c6b318aaa60cacde9fb3a60db05d4eda2b626 (plain) (tree)
1
2
3
4
5
6
7
29
pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight
# dwm version
VERSION = 5.6

# Customize below to fit your system

# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man

X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib

# Xinerama, un-comment if you want it
XINERAMALIBS = -L${X11LIB} -lXinerama
XINERAMAFLAGS = -DXINERAMA

# includes and libs
INCS = -I. -I/usr/include -I${X11INC}
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}

# flags
CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = -s ${LIBS}

# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = ${LIBS}

# compiler and linker
CC = cc
>resp.StatusCode != http.StatusOK { t.Errorf(fmt.Sprintf("%v", resp.StatusCode)) } }) } func Test_apiBaseHandler(t *testing.T) { initTestConf() t.Run("apiBaseHandler", func(t *testing.T) { w := httptest.NewRecorder() req := httptest.NewRequest("GET", "localhost"+testport+"/api", nil) indexHandler(w, req) resp := w.Result() if resp.StatusCode != http.StatusOK { t.Errorf(fmt.Sprintf("%v", resp.StatusCode)) } }) } func Test_apiFormatHandler(t *testing.T) { initTestConf() t.Run("apiFormatHandler", func(t *testing.T) { w := httptest.NewRecorder() req := httptest.NewRequest("GET", "localhost"+testport+"/api/plain", nil) indexHandler(w, req) resp := w.Result() if resp.StatusCode != http.StatusOK { t.Errorf(fmt.Sprintf("%v", resp.StatusCode)) } }) } func Test_apiEndpointHandler(t *testing.T) { initTestConf() t.Run("apiEndpointHandler", func(t *testing.T) { w := httptest.NewRecorder() req := httptest.NewRequest("GET", "localhost"+testport+"/api/plain/users", nil) indexHandler(w, req) resp := w.Result() if resp.StatusCode != http.StatusOK { t.Errorf(fmt.Sprintf("%v", resp.StatusCode)) } }) } func Test_apiTagsBaseHandler(t *testing.T) { initTestConf() t.Run("apiTagsBaseHandler", func(t *testing.T) { w := httptest.NewRecorder() req := httptest.NewRequest("GET", "localhost"+testport+"/api/plain/tags", nil) indexHandler(w, req) resp := w.Result() if resp.StatusCode != http.StatusOK { t.Errorf(fmt.Sprintf("%v", resp.StatusCode)) } }) } func Test_apiTagsHandler(t *testing.T) { initTestConf() t.Run("indexHandler", func(t *testing.T) { w := httptest.NewRecorder() req := httptest.NewRequest("GET", "localhost"+testport+"/api/plain/tags/tag", nil) indexHandler(w, req) resp := w.Result() if resp.StatusCode != http.StatusOK { t.Errorf(fmt.Sprintf("%v", resp.StatusCode)) } }) }