Compare commits
4 Commits
c0827c076c
...
fdd69c7a3d
Author | SHA1 | Date | |
---|---|---|---|
fdd69c7a3d | |||
7c7284a3aa | |||
8b82d02439 | |||
bcc11ed3ad |
4
programs
4
programs
@ -40,6 +40,7 @@ pipewire-pulse
|
|||||||
#
|
#
|
||||||
# utility
|
# utility
|
||||||
#
|
#
|
||||||
|
dosfstools
|
||||||
which
|
which
|
||||||
dnsutils
|
dnsutils
|
||||||
|
|
||||||
@ -64,6 +65,7 @@ nmap
|
|||||||
remmina
|
remmina
|
||||||
python-pynvim
|
python-pynvim
|
||||||
xorg-xinput
|
xorg-xinput
|
||||||
|
xorg-xbacklight
|
||||||
neofetch
|
neofetch
|
||||||
cloc
|
cloc
|
||||||
|
|
||||||
@ -100,6 +102,8 @@ bash-language-server
|
|||||||
vscode-css-languageserver
|
vscode-css-languageserver
|
||||||
adwaita-color-schemes
|
adwaita-color-schemes
|
||||||
lxappearance
|
lxappearance
|
||||||
|
radare2
|
||||||
|
gdb
|
||||||
|
|
||||||
# .local/bin/calcpy/ script
|
# .local/bin/calcpy/ script
|
||||||
ipython
|
ipython
|
||||||
|
@ -19,16 +19,24 @@ set showtabline=0
|
|||||||
" performance?
|
" performance?
|
||||||
set lazyredraw nocursorline ttyfast
|
set lazyredraw nocursorline ttyfast
|
||||||
|
|
||||||
" use system clipboard instead of internal
|
|
||||||
set clipboard=unnamedplus
|
|
||||||
" when using c or s, do not overwrite clipboard
|
|
||||||
nnoremap c "-c
|
|
||||||
vnoremap c "-c
|
|
||||||
nnoremap s "-s
|
|
||||||
vnoremap s "-s
|
|
||||||
|
|
||||||
let mapleader = ","
|
let mapleader = ","
|
||||||
|
|
||||||
|
" " use system clipboard instead of internal
|
||||||
|
" set clipboard=unnamedplus
|
||||||
|
" " when using c or s, do not overwrite clipboard
|
||||||
|
" nnoremap c "-c
|
||||||
|
" vnoremap c "-c
|
||||||
|
" nnoremap s "-s
|
||||||
|
" vnoremap s "-s
|
||||||
|
|
||||||
|
" easier binds to use system clipboard with
|
||||||
|
nnoremap <leader>cy "+yy
|
||||||
|
vnoremap <leader>cy "+y
|
||||||
|
vnoremap <leader>cd "+d
|
||||||
|
nnoremap <leader>cd "+dd
|
||||||
|
nnoremap <leader>cp "+p
|
||||||
|
nnoremap <leader>cP "+P
|
||||||
|
|
||||||
set shell=/bin/sh
|
set shell=/bin/sh
|
||||||
|
|
||||||
hi Search cterm=NONE ctermfg=white ctermbg=blue
|
hi Search cterm=NONE ctermfg=white ctermbg=blue
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
if has('python3') && ($SYSTEM_PROFILE == "DEFAULT" || $SYSTEM_PROFILE == "SLIM")
|
if has('python3') && ($SYSTEM_PROFILE == "DEFAULT" || $SYSTEM_PROFILE == "SLIM")
|
||||||
Plug 'SirVer/ultisnips'
|
Plug 'SirVer/ultisnips'
|
||||||
let g:UltiSnipsExpandTrigger="<c-m>"
|
let g:UltiSnipsExpandTrigger="<c-m>"
|
||||||
let g:UltiSnipsJumpForwardTrigger="<c-m>"
|
let g:UltiSnipsJumpForwardTrigger="<c-l>"
|
||||||
let g:UltiSnipsJumpBackwardTrigger="<c-b>"
|
let g:UltiSnipsJumpBackwardTrigger="<c-b>"
|
||||||
let g:UltiSnipsSnippetDirectories=[$HOME.'/.config/nvim/ultisnips/']
|
let g:UltiSnipsSnippetDirectories=[$HOME.'/.config/nvim/ultisnips/']
|
||||||
endif
|
endif
|
||||||
|
42
src/.local/bin/fuzztest.sh
Executable file
42
src/.local/bin/fuzztest.sh
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# cobbled together testing script for competitive programming
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
|
||||||
|
echo "usage: fuzztest.sh [test generator] [known-good] [to-test]"
|
||||||
|
echo
|
||||||
|
echo "test generator: prints a random test case to stdout"
|
||||||
|
echo "known-good: reads from stdin, prints to stdout"
|
||||||
|
echo "to-test: behaviour will be compared to known-good"
|
||||||
|
echo
|
||||||
|
echo "to use python programs here, add a python shebang and chmod +x"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$FUZZDIR" ]; then
|
||||||
|
FUZZDIR=~/.cache/fuzztester
|
||||||
|
fi
|
||||||
|
mkdir -p "$FUZZDIR"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
$1 > "$FUZZDIR"/input
|
||||||
|
wc -c "$FUZZDIR"/input
|
||||||
|
cat "$FUZZDIR"/input | $3 > "$FUZZDIR"/faulty
|
||||||
|
cat "$FUZZDIR"/input | $2 > "$FUZZDIR"/good
|
||||||
|
|
||||||
|
RES="$(diff "$FUZZDIR"/faulty "$FUZZDIR"/good || true)"
|
||||||
|
if [ ! -z "$RES" ]; then
|
||||||
|
printf "\n\n\n-----------\n"
|
||||||
|
echo failed test case detected!
|
||||||
|
echo
|
||||||
|
echo the known-good and to-test programs differed in output.
|
||||||
|
echo
|
||||||
|
echo stdin: "$FUZZDIR"/input
|
||||||
|
echo faulty output: "$FUZZDIR"/faulty
|
||||||
|
echo good output: "$FUZZDIR"/good
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo good
|
||||||
|
fi
|
||||||
|
done
|
Loading…
x
Reference in New Issue
Block a user