fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
c0a988da2
master
1# RUN: fish=%fish %fish %s 2 3# A function to display bytes, necessary because GNU and BSD implementations of `od` have different output. 4# We used to use xxd, but it's not available everywhere. See #3797. 5# 6# We use the lowest common denominator format, `-b`, because it should work in all implementations. 7# I wish we could use the `-t` flag but it isn't available in every OS we're likely to run on. 8# 9function display_bytes 10od -b| sed -e's/ */ /g' -e's/ *$//' 11end 12 13# Verify that our UTF-8 locale produces the expected output. 14echo -n A\u00FC A| display_bytes 15#CHECK: 0000000 101 303 274 101 16#CHECK: 0000004 17 18# Since the previous change was localized to a block it should no 19# longer be in effect and we should be back to a UTF-8 locale. 20echo -n C\u00FC C| display_bytes 21#CHECK: 0000000 103 303 274 103 22#CHECK: 0000004 23 24string match ö\Xc3\Xb6 25#CHECK: ö 26 27math 5 \X2b 5 28#CHECK: 10 29 30math 7 \x2b 7 31#CHECK: 14 32 33echo \xc3\xb6 34# CHECK: ö 35echo \Xc3\Xb6 36# CHECK: ö