1
1
mirror of https://github.com/wader/fq.git synced 2024-12-26 23:15:04 +03:00
fq/pkg/interp/testdata/basic.fqtest
2021-09-12 13:08:49 +02:00

53 lines
1.2 KiB
Plaintext

# ffmpeg -f lavfi -i sine -t 10ms test.mp3
/test.mp3:
$ fq -d mp3 '.headers[0].magic == "ID3"' /test.mp3
true
$ fq -d mp3 '.headers[0].version == 4' /test.mp3
true
$ fq -d mp3 '.frames[0].header.protection == true' /test.mp3
true
$ fq -d mp3 '.headers[0].flags + {}' /test.mp3
{
"experimental_indicator": false,
"extended_header": false,
"unsynchronisation": false,
"unused": 0
}
$ fq -d mp3 '._unknown' /test.mp3
false
$ fq -d mp3 '._format' /test.mp3
"mp3"
$ fq -d mp3 '.headers[0].magic._format' /test.mp3
null
$ fq -d raw '._bytes | string'
"abc\n"
stdin:
abc
$ fq -n "{a: 123, b: []} | debug"
{
"a": 123,
"b": []
}
stderr:
["DEBUG",{"a":123,"b":[]}]
$ fq -n options
{
"addrbase": 16,
"bitsformat": "snippet",
"bytecolors": "0-0xff=brightwhite,0=brightblack,32-126:9-13=white",
"color": false,
"colors": "array=white,dumpaddr=yellow,dumpheader=yellow+underline,error=brightred,false=yellow,index=white,null=brightblack,number=cyan,object=white,objectkey=brightblue,string=green,true=yellow,value=white",
"compact": false,
"decodeprogress": false,
"depth": 0,
"displaybytes": 16,
"joinstring": "\n",
"linebytes": 16,
"raw": false,
"rawstring": false,
"repl": false,
"sizebase": 10,
"unicode": false,
"verbose": false
}